forked from lavender/watch-party
		
	Compare commits
	
		
			1 commit
		
	
	
		
			main
			...
			experiment
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4dfe6a544d | 
					 2 changed files with 5 additions and 11 deletions
				
			
		|  | @ -43,15 +43,6 @@ export const setupChat = async (socket) => { | |||
|   document.querySelector("#chatbox-container").style["display"] = "block"; | ||||
|   setupChatboxEvents(socket); | ||||
| 
 | ||||
|   window.addEventListener("keydown", event => { | ||||
|     try { | ||||
|       const isSelectionEmpty = window.getSelection().toString().length === 0; | ||||
|       if (event.code.match(/Key\w/) && isSelectionEmpty) | ||||
|         document.querySelector("#chatbox-send > input").focus() | ||||
|     } catch (_err) { | ||||
|     } | ||||
|   }); | ||||
| 
 | ||||
|   fixChatSize(); | ||||
|   window.addEventListener("resize", () => { | ||||
|     fixChatSize(); | ||||
|  |  | |||
|  | @ -73,7 +73,7 @@ const setupIncomingEvents = (video, socket) => { | |||
|       } | ||||
| 
 | ||||
|       logEventToChat(event); | ||||
|     } catch (_err) { } | ||||
|     } catch (_err) {} | ||||
|   }); | ||||
| }; | ||||
| 
 | ||||
|  | @ -86,6 +86,7 @@ const setupOutgoingEvents = (video, socket) => { | |||
| 
 | ||||
|   video.addEventListener("pause", async (event) => { | ||||
|     if (outgoingDebounce || !video.controls) { | ||||
|       event.preventDefault(); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -107,6 +108,7 @@ const setupOutgoingEvents = (video, socket) => { | |||
| 
 | ||||
|   video.addEventListener("play", (event) => { | ||||
|     if (outgoingDebounce || !video.controls) { | ||||
|       event.preventDefault(); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -130,6 +132,7 @@ const setupOutgoingEvents = (video, socket) => { | |||
|     } | ||||
| 
 | ||||
|     if (outgoingDebounce || !video.controls) { | ||||
|       event.preventDefault(); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue