Skip to content

Commit

Permalink
Plyr: Disable double click to fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
user234683 committed Jul 28, 2021
1 parent f9f5d5b commit b75dc03
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions youtube/static/js/plyr-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@ const player = new Plyr(document.querySelector('video'), {
global: false,
},
});

// disable double click to fullscreen
// https://github.com/sampotts/plyr/issues/1370#issuecomment-528966795
player.eventListeners.forEach(function(eventListener) {
if(eventListener.type === 'dblclick') {
eventListener.element.removeEventListener(eventListener.type, eventListener.callback, eventListener.options);
}
});

0 comments on commit b75dc03

Please sign in to comment.