forked from lavender/watch-party
		
	Don't allow controls by default
This commit is contained in:
		
							parent
							
								
									8717e0dff2
								
							
						
					
					
						commit
						8e19d7b34d
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		|  | @ -228,10 +228,18 @@ export const joinSession = async () => { | ||||||
|       is_playing |       is_playing | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|  |     // TODO: Allow the user to set this somewhere
 | ||||||
|  |     let defaultAllowControls = false; | ||||||
|  |     try { | ||||||
|  |       defaultAllowControls = localStorage.getItem( | ||||||
|  |         "watch-party-default-allow-controls" | ||||||
|  |       ); | ||||||
|  |     } catch (_err) {} | ||||||
|  | 
 | ||||||
|     // By default, we should disable video controls if the video is already playing.
 |     // By default, we should disable video controls if the video is already playing.
 | ||||||
|     // This solves an issue where Safari users join and seek to 00:00:00 because of
 |     // This solves an issue where Safari users join and seek to 00:00:00 because of
 | ||||||
|     // outgoing events.
 |     // outgoing events.
 | ||||||
|     if (current_time_ms != 0) { |     if (current_time_ms != 0 || !defaultAllowControls) { | ||||||
|       video.controls = false; |       video.controls = false; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue