Permalink
Browse files

Merge branch 'iss30' into develop

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...
2 parents f0c92b9 + c1bdc0e commit 9d11fd1a15bf7ff99391fee74546aefba9e2dd24 @eduardocereto eduardocereto committed Aug 7, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/plugins/youtube.js
@@ -21,7 +21,6 @@ var _ytOpts;
*/
var _ytPoolMaps = {};
-
function _ytPool(target, hash) {
if (_ytPoolMaps[hash] === undefined ||
_ytPoolMaps[hash].timeTriggers.length <= 0) {
@@ -41,7 +40,7 @@ function _ytPool(target, hash) {
}
function _ytStopPool(target) {
- var h = target['getVideoData']()['video_id'];
+ var h = target['getVideoUrl']();
if (_ytPoolMaps[h] && _ytPoolMaps[h].timer) {
_ytPool(target, h); // Pool one last time before clearing it.
clearTimeout(_ytPoolMaps[h].timer);
@@ -50,10 +49,10 @@ function _ytStopPool(target) {
function _ytStartPool(target) {
if (_ytTimeTriggers && _ytTimeTriggers.length) {
- var h = target['getVideoData']()['video_id'];
+ var h = target['getVideoUrl']();
if (_ytPoolMaps[h]) {
_ytStopPool(target);
- } else {
+ }else {
_ytPoolMaps[h] = {};
_ytPoolMaps[h].timeTriggers = slice.call(_ytTimeTriggers);
}

0 comments on commit 9d11fd1

Please sign in to comment.