mirror of https://github.com/calzoneman/sync.git
Implement #189
This commit is contained in:
parent
e030a2bfa6
commit
543ec91e9b
|
@ -58,6 +58,7 @@ var Player = function(data) {
|
||||||
this.nullPlayer();
|
this.nullPlayer();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.load(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
Player.prototype.nullPlayer = function() {
|
Player.prototype.nullPlayer = function() {
|
||||||
|
@ -114,18 +115,22 @@ Player.prototype.initYouTube = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pause = function() {
|
this.pause = function() {
|
||||||
|
if(this.player.pauseVideo)
|
||||||
this.player.pauseVideo();
|
this.player.pauseVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.play = function() {
|
this.play = function() {
|
||||||
|
if(this.player.playVideo)
|
||||||
this.player.playVideo();
|
this.player.playVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getTime = function(callback) {
|
this.getTime = function(callback) {
|
||||||
|
if(this.player.getCurrentTime)
|
||||||
callback(this.player.getCurrentTime());
|
callback(this.player.getCurrentTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.seek = function(time) {
|
this.seek = function(time) {
|
||||||
|
if(this.player.seekTo)
|
||||||
this.player.seekTo(time, true);
|
this.player.seekTo(time, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,6 +190,8 @@ $("#userpl_save").click(function() {
|
||||||
var caret = btn.find(".caret").detach();
|
var caret = btn.find(".caret").detach();
|
||||||
btn.text($(select).text());
|
btn.text($(select).text());
|
||||||
caret.appendTo(btn);
|
caret.appendTo(btn);
|
||||||
|
if(PLAYER.type == "yt" && PLAYER.player.setPlaybackQuality)
|
||||||
|
PLAYER.player.setPlaybackQuality(VIDEOQUALITY);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
qualHandler("#quality_240p", "small");
|
qualHandler("#quality_240p", "small");
|
||||||
|
@ -199,6 +201,12 @@ $("#userpl_save").click(function() {
|
||||||
qualHandler("#quality_1080p", "hd1080");
|
qualHandler("#quality_1080p", "hd1080");
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
$("#mediarefresh").click(function() {
|
||||||
|
PLAYER.type = "";
|
||||||
|
PLAYER.id = "";
|
||||||
|
socket.emit("playerReady");
|
||||||
|
});
|
||||||
|
|
||||||
/* playlist controls */
|
/* playlist controls */
|
||||||
|
|
||||||
$("#queue").sortable({
|
$("#queue").sortable({
|
||||||
|
|
|
@ -156,6 +156,7 @@
|
||||||
<li><a id="quality_1080p" href="javascript:void(0)">1080p</a></li>
|
<li><a id="quality_1080p" href="javascript:void(0)">1080p</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<button class="btn btn-small" id="mediarefresh">Refresh Media</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- electric boogaloo -->
|
<!-- electric boogaloo -->
|
||||||
<div class="span12" id="queue_align2"></div>
|
<div class="span12" id="queue_align2"></div>
|
||||||
|
|
Loading…
Reference in New Issue