diff --git a/webroot/js/player.js b/webroot/js/player.js
index 3c6c7f8..5047bc6 100644
--- a/webroot/js/player.js
+++ b/webroot/js/player.js
@@ -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") {
diff --git a/webroot/player.shs b/webroot/player.shs
index f0438af..90bbf80 100755
--- a/webroot/player.shs
+++ b/webroot/player.shs
@@ -9,8 +9,8 @@ echo '
height: 480px;
}
.settings_menu {
- height: 175px;
- width: 250px;
+ height: 200px;
+ width: 225px;
display: none;
background-color: #1b1b1b;
z-index: 999;
@@ -36,7 +36,17 @@ echo '
-
+
+
+