[plyr]: update

This commit is contained in:
Jesús
2021-08-09 22:09:04 -05:00
parent 0e9c12b3a6
commit af1df31161
6 changed files with 3351 additions and 4026 deletions

View File

@@ -0,0 +1,37 @@
let captionsActive;
switch(true) {
case data.settings.subtitles_mode == 2:
captionsActive = true;
break;
case data.settings.subtitles_mode == 1 && data.has_manual_captions:
captionsActive = true;
break;
default:
captionsActive = false;
}
const player = new Plyr(document.getElementById('js-video-player'), {
disableContextMenu: false,
captions: {
active: captionsActive,
language: data.settings.subtitles_language,
},
controls: [
'play-large',
'play',
'progress',
'current-time',
'duration',
'mute',
'volume',
'captions',
'settings',
'fullscreen'
],
iconUrl: "/youtube.com/static/modules/plyr/plyr.svg",
blankVideo: "/youtube.com/static/modules/plyr/blank.webm",
debug: false,
storage: {enabled: false}
});

View File

@@ -0,0 +1,23 @@
# Build steps for Plyr (3.6.8)
Tested on Hyperbola GNU with Linux-libre.
First install npm (node package manager).
Clone the repo to a location of your choosing:
```
git clone https://git.sr.ht/~heckyel/plyr
cd plyr
```
Install Plyr's dependencies:
```
npm install
```
Build with npm:
```
npm run build
```
plyr.js and other files will be in the `dist` directory.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long