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

audio volume setting (doesn't behave properly in some browsers)

This commit is contained in:
Techywarrior 2013-04-27 11:26:29 -07:00
parent 538f8afac0
commit 7e3e103989

View file

@ -11,6 +11,8 @@
function playAudio(items, params) {
var item = items[0];
var volume = localStorage.getItem("volume") || 0.5;
var baseParams = {
audioChannels: 2,
audioBitrate: 128000
@ -50,10 +52,16 @@
$('#mediaElement', nowPlayingBar).html(html);
$(".itemAudio").volume = volume;
$(".itemAudio").on("ended",function(){
Playlist.playNext();
});
$(".itemAudio").on("volumechange", function () {
localStorage.setItem("volume", (this).volume);
});
return $('audio', nowPlayingBar)[0];
}