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:
parent
538f8afac0
commit
7e3e103989
1 changed files with 8 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue