Fix some volume sync issues and another small issue

This commit is contained in:
calzoneman 2014-01-07 19:30:30 -06:00
parent 1efcca6be9
commit 73235e5fbb
4 changed files with 16 additions and 4 deletions

View File

@ -720,6 +720,12 @@ function VimeoIsADoucheCopter(id, cb) {
cb(files);
});
} catch (e) {
if (data.indexOf("crawler") !== -1) {
setImmediate(function () {
VimeoIsADoucheCopter(id, cb);
});
return;
}
Logger.errlog.log("Vimeo workaround error: ");
Logger.errlog.log(e);
Logger.errlog.log(data);

View File

@ -1011,8 +1011,10 @@ Callbacks = {
changeMedia: function(data) {
if (PLAYER) {
PLAYER.getVolume(function (v) {
if (typeof v === "number") {
VOLUME = v;
setOpt("volume", VOLUME);
}
});
}

View File

@ -133,7 +133,7 @@ var USEROPTS = {
no_h264 : getOrDefault("no_h264", default_noh264())
};
var VOLUME = getOrDefault("volume", 1);
var VOLUME = parseFloat(getOrDefault("volume", 1));
var NO_WEBSOCKETS = USEROPTS.altsocket;

View File

@ -1048,8 +1048,12 @@ function RawVideoPlayer(data) {
self.getVolume = function (cb) {
if (self.player) {
if (self.player.muted) {
cb(0);
} else {
cb(self.player.volume);
}
}
};
self.setVolume = function (vol) {