Fireplace easteregg is now implemented so it can be activated

This commit is contained in:
KasperRT
2015-03-25 21:19:22 +01:00
parent 53b7b45e36
commit b6e38d8ab8
5 changed files with 62 additions and 20 deletions

View File

@@ -1,21 +1,35 @@
setup = false;
function jazz_setup()
{
console.log(setup);
document.getElementsByClassName("ytplayer")[0].style.display = "none";
jplayer = new YT.Player('jplayer', {
height: window.height*0.75,
width: window.width*0.6,
videoId: response,
playerVars: { rel:"0", wmode:"transparent", controls: "0" , iv_load_policy: "3", theme:"light", color:"white"},
events: {
'onReady': onJazzReady,
'onStateChange': onJazzState
}
});
if(!setup)
{
jplayer = new YT.Player('jplayer', {
height: window.height*0.75,
width: window.width*0.6,
videoId: response,
playerVars: { rel:"0", wmode:"transparent", controls: "0" , iv_load_policy: "3", theme:"light", color:"white"},
events: {
'onReady': onJazzReady,
'onStateChange': onJazzState
}
});
setup = true;
}else if(setup)
{
console.log(1234567890);
jplayer.playVideo();
}
document.getElementsByClassName("jp")[0].style.display = "inline";
}
function pauseJazz()
{
jplayer.pauseVideo();
}
function onJazzState(state)
{
if(state.data == 0)
@@ -43,3 +57,8 @@ function onJazzReady(event) {
initSlider();
//durationFixer = setInterval(durationSetter, 1000);
}
$(document).ready(function()
{
jazz_setup();
});