diff options
author | Jesús <heckyel@hyperbola.info> | 2019-05-22 18:21:00 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-05-22 18:21:00 -0500 |
commit | 8ff5076c5c9cc5e5f597b8f2820bc5ced782ac5b (patch) | |
tree | 23cd14bb5787f46fda715c5360048f679e0898e9 | |
parent | 84321a94f5191eba0ad4b97092b5fa0aaad3ebc1 (diff) | |
download | ytlibre-8ff5076c5c9cc5e5f597b8f2820bc5ced782ac5b.tar.lz ytlibre-8ff5076c5c9cc5e5f597b8f2820bc5ced782ac5b.tar.xz ytlibre-8ff5076c5c9cc5e5f597b8f2820bc5ced782ac5b.zip |
organized and contextmenu to videoplayer into embed
-rw-r--r-- | templates/embed.tpl | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/templates/embed.tpl b/templates/embed.tpl index 6934726..4cf4135 100644 --- a/templates/embed.tpl +++ b/templates/embed.tpl @@ -35,7 +35,7 @@ </script> </head> <body> - <video class="player-ply" controls poster="{$librethumb}" data-setup="{}"> + <video id="player-ply" controls poster="{$librethumb}" data-setup="{}"> {$breaklink} {foreach $streamFormats as $stream} <source data-res="{trim($stream->resolution, 'p')}" src="{$stream->url}" type='{$stream->type}'/> @@ -46,7 +46,23 @@ <script> // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later document.addEventListener('DOMContentLoaded', () => { - const players = Array.from(document.querySelectorAll('.player-ply')).map(player => new Plyr(player)); + const player = new Plyr(document.getElementById('player-ply'), { + disableContextMenu: false, + controls: [ + 'play-large', + 'play', + 'progress', + 'current-time', + 'mute', + 'volume', + 'captions', + 'settings', + 'download', + 'fullscreen' + ] + }); + // debug + // window.player = player; }); // @license-end </script> |