1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

remember volume on local client for video player

This commit is contained in:
Techywarrior 2013-03-27 18:02:34 -07:00
parent 6e356b2c0f
commit fadaf9785f

View file

@ -117,6 +117,8 @@
var screenWidth = Math.max(screen.height, screen.width);
var screenHeight = Math.min(screen.height, screen.width);
var volume = localStorage.getItem("volume") || 0.5;
var baseParams = {
audioChannels: 2,
audioBitrate: 128000,
@ -167,7 +169,8 @@
{ type: "video/mp4", src: mp4VideoUrl },
{ type: "video/mp2t; codecs='h264, aac'", src: tsVideoUrl },
{ type: "application/x-mpegURL", src: hlsVideoUrl },
{ type: "video/ogg", src: ogvVideoUrl }]);
{ type: "video/ogg", src: ogvVideoUrl }]
).volume(volume);
videoJSextension.setup_video( $( '#videoWindow' ), item );
@ -180,6 +183,10 @@
$(".vjs-remaining-time-display").show();
});
(this).addEvent("volumechange",function(){
localStorage.setItem("volume", (this).volume());
});
(this).addEvent("play", MediaPlayer.updateProgress);
ApiClient.reportPlaybackStart(Dashboard.getCurrentUserId(), item.Id);