|
@@ -1214,6 +1214,7 @@ Template.room.onCreated(function () {
|
|
}
|
|
}
|
|
$("#player").show();
|
|
$("#player").show();
|
|
if (yt_player === undefined) {
|
|
if (yt_player === undefined) {
|
|
|
|
+ console.log("Hello!");
|
|
yt_player = new YT.Player("player", {
|
|
yt_player = new YT.Player("player", {
|
|
height: 540,
|
|
height: 540,
|
|
width: 960,
|
|
width: 960,
|
|
@@ -1222,9 +1223,11 @@ Template.room.onCreated(function () {
|
|
events: {
|
|
events: {
|
|
'onReady': function(event) {
|
|
'onReady': function(event) {
|
|
if(currentSong.skipDuration === undefined){
|
|
if(currentSong.skipDuration === undefined){
|
|
|
|
+ console.log("no skipDuration")
|
|
currentSong.skipDuration = 0;
|
|
currentSong.skipDuration = 0;
|
|
}
|
|
}
|
|
event.target.seekTo(Number(currentSong.skipDuration) + getTimeElapsed() / 1000);
|
|
event.target.seekTo(Number(currentSong.skipDuration) + getTimeElapsed() / 1000);
|
|
|
|
+ console.log(Number(currentSong.skipDuration) + getTimeElapsed() / 1000);
|
|
event.target.playVideo();
|
|
event.target.playVideo();
|
|
event.target.setVolume(volume);
|
|
event.target.setVolume(volume);
|
|
resizeSeekerbar();
|
|
resizeSeekerbar();
|
|
@@ -1242,7 +1245,8 @@ Template.room.onCreated(function () {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- yt_player.loadVideoById(currentSong.id);
|
|
|
|
|
|
+ console.log("I'm in loadVid thing....")
|
|
|
|
+ yt_player.loadVideoById(currentSong.id, Number(currentSong.skipDuration) + getTimeElapsed() / 1000);
|
|
}
|
|
}
|
|
|
|
|
|
getSongInfo(currentSong);
|
|
getSongInfo(currentSong);
|