Add plyr as main player
Also plyr supports switch quality
This commit is contained in:
parent
e44647f106
commit
b3abec81e1
23
youtube/static/js/plyr-start.js
Normal file
23
youtube/static/js/plyr-start.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
|
||||||
|
const player = new Plyr(document.getElementById('js-video-player'), {
|
||||||
|
disableContextMenu: false,
|
||||||
|
captions: {
|
||||||
|
active: true,
|
||||||
|
language: 'en'
|
||||||
|
},
|
||||||
|
controls: [
|
||||||
|
'play-large',
|
||||||
|
'play',
|
||||||
|
'progress',
|
||||||
|
'current-time',
|
||||||
|
'mute',
|
||||||
|
'volume',
|
||||||
|
'captions',
|
||||||
|
'settings',
|
||||||
|
'fullscreen'
|
||||||
|
],
|
||||||
|
iconUrl: "/youtube.com/static/modules/plyr/plyr.svg",
|
||||||
|
blankVideo: "/youtube.com/static/modules/plyr/blank.webm",
|
||||||
|
debug: false
|
||||||
|
});
|
||||||
|
// @license-end
|
BIN
youtube/static/modules/plyr/blank.webm
Normal file
BIN
youtube/static/modules/plyr/blank.webm
Normal file
Binary file not shown.
1
youtube/static/modules/plyr/plyr.css
Normal file
1
youtube/static/modules/plyr/plyr.css
Normal file
File diff suppressed because one or more lines are too long
9320
youtube/static/modules/plyr/plyr.js
Normal file
9320
youtube/static/modules/plyr/plyr.js
Normal file
File diff suppressed because it is too large
Load Diff
4
youtube/static/modules/plyr/plyr.min.js
vendored
Normal file
4
youtube/static/modules/plyr/plyr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
youtube/static/modules/plyr/plyr.min.js.map
Normal file
1
youtube/static/modules/plyr/plyr.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
youtube/static/modules/plyr/plyr.min.mjs
Normal file
3
youtube/static/modules/plyr/plyr.min.mjs
Normal file
File diff suppressed because one or more lines are too long
1
youtube/static/modules/plyr/plyr.min.mjs.map
Normal file
1
youtube/static/modules/plyr/plyr.min.mjs.map
Normal file
File diff suppressed because one or more lines are too long
9312
youtube/static/modules/plyr/plyr.mjs
Normal file
9312
youtube/static/modules/plyr/plyr.mjs
Normal file
File diff suppressed because it is too large
Load Diff
15761
youtube/static/modules/plyr/plyr.polyfilled.js
Normal file
15761
youtube/static/modules/plyr/plyr.polyfilled.js
Normal file
File diff suppressed because it is too large
Load Diff
4
youtube/static/modules/plyr/plyr.polyfilled.min.js
vendored
Normal file
4
youtube/static/modules/plyr/plyr.polyfilled.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
youtube/static/modules/plyr/plyr.polyfilled.min.js.map
Normal file
1
youtube/static/modules/plyr/plyr.polyfilled.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
youtube/static/modules/plyr/plyr.polyfilled.min.mjs
Normal file
3
youtube/static/modules/plyr/plyr.polyfilled.min.mjs
Normal file
File diff suppressed because one or more lines are too long
1
youtube/static/modules/plyr/plyr.polyfilled.min.mjs.map
Normal file
1
youtube/static/modules/plyr/plyr.polyfilled.min.mjs.map
Normal file
File diff suppressed because one or more lines are too long
15753
youtube/static/modules/plyr/plyr.polyfilled.mjs
Normal file
15753
youtube/static/modules/plyr/plyr.polyfilled.mjs
Normal file
File diff suppressed because it is too large
Load Diff
1
youtube/static/modules/plyr/plyr.svg
Normal file
1
youtube/static/modules/plyr/plyr.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 5.6 KiB |
@ -30,6 +30,20 @@ video {
|
|||||||
max-height: 480px;
|
max-height: 480px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* plyr fix */
|
||||||
|
.plyr:-moz-full-screen video {
|
||||||
|
max-height: initial;
|
||||||
|
}
|
||||||
|
.plyr:-webkit-full-screen video {
|
||||||
|
max-height: initial;
|
||||||
|
}
|
||||||
|
.plyr:-ms-fullscreen video {
|
||||||
|
max-height: initial;
|
||||||
|
}
|
||||||
|
.plyr:fullscreen video {
|
||||||
|
max-height: initial;
|
||||||
|
}
|
||||||
|
|
||||||
a:link {
|
a:link {
|
||||||
color: var(--link);
|
color: var(--link);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,11 @@
|
|||||||
<td data-label="License"><a href="http://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0 or later</a></td>
|
<td data-label="License"><a href="http://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0 or later</a></td>
|
||||||
<td data-label="Source"><a href="/youtube.com/static/js/playlistadd.js">playlistadd.js</a></td>
|
<td data-label="Source"><a href="/youtube.com/static/js/playlistadd.js">playlistadd.js</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="File"><a href="/youtube.com/static/modules/plyr/plyr.min.js">plyr.min.js</a></td>
|
||||||
|
<td data-label="License"><a href="https://www.freebsd.org/copyright/freebsd-license.html">Expat</a></td>
|
||||||
|
<td data-label="Source"><a href="/youtube.com/static/modules/plyr/plyr.js">plyr.js</a></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td data-label="File"><a href="/youtube.com/static/js/speedyplay.js">speedyplay.js</a></td>
|
<td data-label="File"><a href="/youtube.com/static/js/speedyplay.js">speedyplay.js</a></td>
|
||||||
<td data-label="License"><a href="http://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0 or later</a></td>
|
<td data-label="License"><a href="http://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0 or later</a></td>
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
{% block style %}
|
{% block style %}
|
||||||
<link href="/youtube.com/static/message_box.css" rel="stylesheet"/>
|
<link href="/youtube.com/static/message_box.css" rel="stylesheet"/>
|
||||||
<link href="/youtube.com/static/watch.css" rel="stylesheet"/>
|
<link href="/youtube.com/static/watch.css" rel="stylesheet"/>
|
||||||
|
<!-- plyr -->
|
||||||
|
<link href="/youtube.com/static/modules/plyr/plyr.css" rel="stylesheet"/>
|
||||||
|
<!--/ plyr -->
|
||||||
{% endblock style %}
|
{% endblock style %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
@ -30,7 +33,7 @@
|
|||||||
<figure class="sc-video">
|
<figure class="sc-video">
|
||||||
<video id="js-video-player" playsinline controls>
|
<video id="js-video-player" playsinline controls>
|
||||||
{% for video_source in video_sources %}
|
{% for video_source in video_sources %}
|
||||||
<source src="{{ video_source['src'] }}" type="{{ video_source['type'] }}">
|
<source src="{{ video_source['src'] }}" type="{{ video_source['type'] }}" data-res="{{ video_source['quality'] }}">
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for source in subtitle_sources %}
|
{% for source in subtitle_sources %}
|
||||||
@ -347,6 +350,12 @@
|
|||||||
</script>
|
</script>
|
||||||
<script src="/youtube.com/static/js/common.js"></script>
|
<script src="/youtube.com/static/js/common.js"></script>
|
||||||
<script src="/youtube.com/static/js/transcript-table.js"></script>
|
<script src="/youtube.com/static/js/transcript-table.js"></script>
|
||||||
|
<!-- plyr -->
|
||||||
|
<script src="/youtube.com/static/modules/plyr/plyr.min.js"
|
||||||
|
integrity="sha512-l6ZzdXpfMHRfifqaR79wbYCEWjLDMI9DnROvb+oLkKq6d7MGroGpMbI7HFpicvmAH/2aQO+vJhewq8rhysrImw=="
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="/youtube.com/static/js/plyr-start.js"></script>
|
||||||
|
<!-- /plyr -->
|
||||||
{% if settings.use_video_hotkeys %} <script src="/youtube.com/static/js/hotkeys.js"></script> {% endif %}
|
{% if settings.use_video_hotkeys %} <script src="/youtube.com/static/js/hotkeys.js"></script> {% endif %}
|
||||||
{% if settings.use_comments_js %} <script src="/youtube.com/static/js/comments.js"></script> {% endif %}
|
{% if settings.use_comments_js %} <script src="/youtube.com/static/js/comments.js"></script> {% endif %}
|
||||||
{% if settings.use_sponsorblock_js %} <script src="/youtube.com/static/js/sponsorblock.js"></script> {% endif %}
|
{% if settings.use_sponsorblock_js %} <script src="/youtube.com/static/js/sponsorblock.js"></script> {% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user