LeonHeidelbach / ttv_adEraser

TTV AdEraser aims to remove livestream ads as well as add some useful features to our favourite streaming site.
MIT License
127 stars 3 forks source link

Pressing the Spacebar or K key pauses the stream, even when typing into chat #35

Open Nystrata opened 2 years ago

Nystrata commented 2 years ago

Pressing the Spacebar or K key pauses the stream, even when typing into chat in Chrome. With the add-on disabled, using those keys in chat is does not pause.

ffomega commented 2 years ago

It's not just pressing space or K, it's whenever you use any of the twitch keyboard shortcuts, such as M or F for muting and toggling full screen

HiPoEGH commented 2 years ago

Workaround is to pop-out chat.

mammour commented 2 years ago

embed theatre mode (if i get commentaries right) function ttvTheaterMode mode is causing this , in cnt.js line 619 : top.window.addEventListener("keydown", keyEventHandler,true);

cause the events to get handled on the whole window, need some condition to either load or not this function on twitch / outside of twitch

if(window.location.hostname != 'www.twitch.tv' && window.location.hostname != 'twitch.tv'){top.window.addEventListener("keydown", keyEventHandler,true);} or add this condition to the whole function call on line 271