Skip to content

Commit

Permalink
Merge branch 'iss30' into develop
Browse files Browse the repository at this point in the history
Fixes #30. Merges remote branch into develop.

Fixes issue with youtube API. We were using an unstageupported API
version before and that started to cause problems.
  • Loading branch information
eduardocereto committed Aug 7, 2012
2 parents f0c92b9 + c1bdc0e commit 9d11fd1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/plugins/youtube.js
Expand Up @@ -21,7 +21,6 @@ var _ytOpts;
*/ */
var _ytPoolMaps = {}; var _ytPoolMaps = {};



function _ytPool(target, hash) { function _ytPool(target, hash) {
if (_ytPoolMaps[hash] === undefined || if (_ytPoolMaps[hash] === undefined ||
_ytPoolMaps[hash].timeTriggers.length <= 0) { _ytPoolMaps[hash].timeTriggers.length <= 0) {
Expand All @@ -41,7 +40,7 @@ function _ytPool(target, hash) {
} }


function _ytStopPool(target) { function _ytStopPool(target) {
var h = target['getVideoData']()['video_id']; var h = target['getVideoUrl']();
if (_ytPoolMaps[h] && _ytPoolMaps[h].timer) { if (_ytPoolMaps[h] && _ytPoolMaps[h].timer) {
_ytPool(target, h); // Pool one last time before clearing it. _ytPool(target, h); // Pool one last time before clearing it.
clearTimeout(_ytPoolMaps[h].timer); clearTimeout(_ytPoolMaps[h].timer);
Expand All @@ -50,10 +49,10 @@ function _ytStopPool(target) {


function _ytStartPool(target) { function _ytStartPool(target) {
if (_ytTimeTriggers && _ytTimeTriggers.length) { if (_ytTimeTriggers && _ytTimeTriggers.length) {
var h = target['getVideoData']()['video_id']; var h = target['getVideoUrl']();
if (_ytPoolMaps[h]) { if (_ytPoolMaps[h]) {
_ytStopPool(target); _ytStopPool(target);
} else { }else {
_ytPoolMaps[h] = {}; _ytPoolMaps[h] = {};
_ytPoolMaps[h].timeTriggers = slice.call(_ytTimeTriggers); _ytPoolMaps[h].timeTriggers = slice.call(_ytTimeTriggers);
} }
Expand Down

0 comments on commit 9d11fd1

Please sign in to comment.