Start working on flat volumes

This commit is contained in:
Calvin Montgomery 2013-12-31 00:14:03 -05:00
parent df16458f98
commit 7ecbddfca1
1 changed files with 14 additions and 0 deletions

View File

@ -105,6 +105,20 @@ var YouTubePlayer = function (data) {
if(self.player && self.player.seekTo)
self.player.seekTo(time, true);
};
self.getVolume = function () {
if (!self.player || !self.player.getVolume || !self.player.isMuted) {
return NaN;
}
return self.player.isMuted() ? 0 : self.player.getVolume()/100;
};
self.setVolume = function (vol) {
if (self.player && self.player.setVolume) {
self.player.setVolume(vol * 100);
}
};
};
var VimeoPlayer = function (data) {