aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/embed.tpl20
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>