+ speed picker
parent
04e0e60cbc
commit
c43ab1657c
|
@ -2,6 +2,7 @@ window.addEventListener('DOMContentLoaded', (event) => {
|
|||
const autoplayInput = document.querySelector('#autoplayInput');
|
||||
const videoStreamInput = document.querySelector('#videoStreamInput');
|
||||
const audioStreamInput = document.querySelector('#audioStreamInput');
|
||||
const speedInput = document.querySelector("#speedInput");
|
||||
const loopInput = document.querySelector("#loopInput");
|
||||
const controlbar = document.querySelector(".html5-video-controls")
|
||||
const video = document.getElementById('player_video');
|
||||
|
@ -276,6 +277,12 @@ window.addEventListener('DOMContentLoaded', (event) => {
|
|||
e.target.src="https://"+window.location.hostname+"/proxy?url="+encodeURIComponent(encodeURIComponent(e.originalTarget.currentSrc))
|
||||
}
|
||||
}
|
||||
|
||||
function changeSpeed() {
|
||||
video.playbackRate = parseFloat(speedInput.value);
|
||||
audio.playbackRate = parseFloat(speedInput.value);
|
||||
}
|
||||
|
||||
function getMimeType(fmt) {
|
||||
const mainType = fmt.vcodec !== 'none' ? 'video' : 'audio';
|
||||
let secondary = {
|
||||
|
@ -365,7 +372,8 @@ window.addEventListener('DOMContentLoaded', (event) => {
|
|||
document.querySelector('body').addEventListener('keydown', (e) => handleKeyboard(e));
|
||||
document.querySelector('.html5-video-container').addEventListener('mousemove', (e) => handleMouse("frame", e));
|
||||
controlbar.addEventListener('mousemove', (e) => handleMouse("controls", e));
|
||||
|
||||
speedInput.addEventListener('change', () => changeSpeed());
|
||||
|
||||
seekAbsolute(startTime);
|
||||
|
||||
if(localStorage.getItem("autoplay") == "true") {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue