mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Update node modules
This commit is contained in:
parent
52a013772f
commit
09d8558456
858 changed files with 5466 additions and 544833 deletions
76
node_modules/@videojs/http-streaming/scripts/index.js
generated
vendored
76
node_modules/@videojs/http-streaming/scripts/index.js
generated
vendored
|
@ -559,7 +559,7 @@
|
|||
'node_modules/video.js/dist/alt/video.core',
|
||||
'node_modules/videojs-contrib-eme/dist/videojs-contrib-eme',
|
||||
'node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels',
|
||||
'node_modules/jb-videojs-hls-quality-selector/dist/jb-videojs-hls-quality-selector'
|
||||
'node_modules/videojs-contrib-quality-menu/dist/videojs-contrib-quality-menu'
|
||||
|
||||
].map(function(url) {
|
||||
return url + (event.target.checked ? '.min' : '') + '.js';
|
||||
|
@ -595,9 +595,7 @@
|
|||
|
||||
player = window.player = window.videojs(videoEl, {
|
||||
plugins: {
|
||||
hlsQualitySelector: {
|
||||
displayCurrentQuality: true
|
||||
}
|
||||
qualityMenu: {}
|
||||
},
|
||||
liveui: stateEls.liveui.checked,
|
||||
enableSourceset: mirrorSource,
|
||||
|
@ -769,5 +767,75 @@
|
|||
|
||||
// run the change handler for the first time
|
||||
stateEls.minified.dispatchEvent(newEvent('change'));
|
||||
|
||||
// Setup the download / copy log buttons
|
||||
const downloadLogsButton = document.getElementById('download-logs');
|
||||
const copyLogsButton = document.getElementById('copy-logs');
|
||||
|
||||
/**
|
||||
* Window location and history joined with line breaks, stringifying any objects
|
||||
*
|
||||
* @return {string} Stringified history
|
||||
*/
|
||||
const stringifiedLogHistory = () => {
|
||||
const player = document.querySelector('video-js').player;
|
||||
const logs = [].concat(player.log.history());
|
||||
const withVhs = !!player.tech(true).vhs;
|
||||
|
||||
return [
|
||||
window.location.href,
|
||||
window.navigator.userAgent,
|
||||
`Video.js ${window.videojs.VERSION}`,
|
||||
`Using VHS: ${withVhs}`,
|
||||
withVhs ? JSON.stringify(player.tech(true).vhs.version()) : ''
|
||||
].concat(logs.map(entryArgs => {
|
||||
return entryArgs.map(item => {
|
||||
return typeof item === 'object' ? JSON.stringify(item) : item;
|
||||
});
|
||||
})).join('\n');
|
||||
};
|
||||
|
||||
/**
|
||||
* Turn a bootstrap button class on briefly then revert to btn-outline-ptimary
|
||||
*
|
||||
* @param {HTMLElement} el Element to add class to
|
||||
* @param {string} stateClass Bootstrap button class suffix
|
||||
*/
|
||||
const doneFeedback = (el, stateClass) => {
|
||||
el.classList.add(`btn-${stateClass}`);
|
||||
el.classList.remove('btn-outline-secondary');
|
||||
|
||||
window.setTimeout(() => {
|
||||
el.classList.add('btn-outline-secondary');
|
||||
el.classList.remove(`btn-${stateClass}`);
|
||||
}, 1500);
|
||||
};
|
||||
|
||||
downloadLogsButton.addEventListener('click', function() {
|
||||
const logHistory = stringifiedLogHistory();
|
||||
const a = document.createElement('a');
|
||||
const href = URL.createObjectURL(new Blob([logHistory], { type: 'text/plain' }));
|
||||
|
||||
a.setAttribute('download', 'vhs-player-logs.txt');
|
||||
a.setAttribute('target', '_blank');
|
||||
a.href = href;
|
||||
a.click();
|
||||
a.remove();
|
||||
URL.revokeObjectURL(href);
|
||||
doneFeedback(downloadLogsButton, 'success');
|
||||
});
|
||||
|
||||
copyLogsButton.addEventListener('click', function() {
|
||||
const logHistory = stringifiedLogHistory();
|
||||
|
||||
window.navigator.clipboard.writeText(logHistory).then(z => {
|
||||
doneFeedback(copyLogsButton, 'success');
|
||||
}).catch(e => {
|
||||
doneFeedback(copyLogsButton, 'danger');
|
||||
console.log('Copy failed', e);
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
}(window));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue