1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-11-20 11:26:54 +00:00

fix music player

This commit is contained in:
devfake 2015-07-05 22:16:25 +02:00
parent 8b0e33e46f
commit d095678478

View File

@ -4,23 +4,25 @@ $(".video-self").tubeplayer({
height: 0.001, height: 0.001,
initialVideo: "UE9fPWy1_o4", initialVideo: "UE9fPWy1_o4",
autoPlay: true, autoPlay: true,
onPlayerPlaying: function(id){
if(localStorage.getItem('volume') == 'off') {
$('.music-icon').removeClass('active');
$(".video-self").tubeplayer('mute');
}
if(localStorage.getItem('volumeValue') != null) {
$('.video-self').tubeplayer('volume', localStorage.getItem('volumeValue'));
$('.volume').val(localStorage.getItem('volumeValue'));
} else {
$('.volume').val('75');
$('.video-self').tubeplayer('volume', 75);
}
},
onPlayerEnded: function(){ onPlayerEnded: function(){
$(".video-self").tubeplayer('play'); $(".video-self").tubeplayer('play');
} }
}); });
if(localStorage.getItem('volume') == 'off') {
$('.music-icon').removeClass('active');
}
if(localStorage.getItem('volumeValue') != null) {
$('.video-self').tubeplayer('volume', localStorage.getItem('volumeValue'));
$('.volume').val(localStorage.getItem('volumeValue'));
} else {
$('.volume').val('75');
$('.video-self').tubeplayer('volume', 75);
}
// Set volume. // Set volume.
$('.volume').on('blur', function() { $('.volume').on('blur', function() {
var val = $(this).val(); var val = $(this).val();