Fixed mute and volume bug

This commit is contained in:
Kasper Rynning-Tønnesen
2015-04-30 23:53:12 +02:00
parent 22baed5429
commit 621b6f36b6
2 changed files with 15 additions and 4 deletions

View File

@@ -21,7 +21,7 @@
<a href="https://github.com/nixolas1/Zoff"> <a href="https://github.com/nixolas1/Zoff">
<img title="Contribute on GitHub" src="static/images/GitHub_Logo.png"> <img title="Contribute on GitHub" src="static/images/GitHub_Logo.png">
</a> </a>
<p> <p>
<a class="waves-effect waves-light btn light-blue share shareface" href="https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>" target="popup" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>','Share Playlist','width=600,height=300')"> <a class="waves-effect waves-light btn light-blue share shareface" href="https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>" target="popup" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/facebook.png">Share on&nbspFacebook <img class="left" src="static/images/facebook.png">Share on&nbspFacebook
</a> </a>
@@ -68,7 +68,7 @@
<script type="text/javascript" src="static/js/youtube.js"></script> <script type="text/javascript" src="static/js/youtube.js"></script>
<script type="text/javascript" src="static/js/search.js"></script> <script type="text/javascript" src="static/js/search.js"></script>
<script type="text/javascript" src="static/js/admin.js"></script> <script type="text/javascript" src="static/js/admin.js"></script>
<script type="text/javascript" src="static/js/lib/materialize.min.js"></script> <script type="text/javascript" src="static/js/lib/materialize.js"></script>
<script type="text/javascript" src="static/js/lib/iscroll-min.js"></script> <script type="text/javascript" src="static/js/lib/iscroll-min.js"></script>
<!-- Piwik tracking --> <!-- Piwik tracking -->

View File

@@ -1,3 +1,5 @@
var muted = false;
function initYoutubeControls(player) function initYoutubeControls(player)
{ {
fitToScreen(); fitToScreen();
@@ -87,8 +89,17 @@ function changeQuality(wantedQ)
function mute_video() function mute_video()
{ {
choose_button(0, true); if(!muted)
ytplayer.mute(); {
choose_button(0, true);
ytplayer.mute();
muted = true;
}else
{
ytplayer.unMute();
muted = false;
choose_button(ytplayer.getVolume(), false);
}
} }
function setVolume(vol) function setVolume(vol)