diff options
author | Sam <me@sampotts.me> | 2016-05-26 22:32:18 +0100 |
---|---|---|
committer | Sam <me@sampotts.me> | 2016-05-26 22:32:18 +0100 |
commit | c0909095e31b2901092f9ca875d7d5536ebc90fd (patch) | |
tree | 6f836c50fc9ec4472bea73c3315b5055b01082c7 /src/js/plyr.js | |
parent | 351e1540c5e7241bc7c4a2d0a0598620c1699d73 (diff) | |
download | plyr-c0909095e31b2901092f9ca875d7d5536ebc90fd.tar.lz plyr-c0909095e31b2901092f9ca875d7d5536ebc90fd.tar.xz plyr-c0909095e31b2901092f9ca875d7d5536ebc90fd.zip |
Added `disableContextMenu` option to hide the right click context menu (fixes #248 and #225)
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 06173523..1794afa1 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr -// plyr.js v1.6.16 +// plyr.js v1.6.17 // https://github.com/selz/plyr // License: The MIT License (MIT) // ========================================================================== @@ -44,10 +44,11 @@ displayDuration: true, loadSprite: true, iconPrefix: 'plyr', - iconUrl: 'https://cdn.plyr.io/1.6.16/plyr.svg', + iconUrl: 'https://cdn.plyr.io/1.6.17/plyr.svg', clickToPlay: true, hideControls: true, showPosterOnEnd: false, + disableContextMenu: true, tooltips: { controls: false, seek: true @@ -2933,6 +2934,11 @@ }); } + // Disable right click + if (config.disableContextMenu) { + _on(plyr.media, 'contextmenu', function(event) { event.preventDefault(); }); + } + // Proxy events to container _on(plyr.media, config.events.join(' '), function(event) { _triggerEvent(plyr.container, event.type, true); |