videojs-vimeo
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "videojs-vimeo", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Allows you to use Vimeo URL as source with Video.js.", | ||
@@ -5,0 +5,0 @@ "main": "src/Vimeo.js", |
@@ -18,5 +18,15 @@ /* The MIT License (MIT) | ||
THE SOFTWARE. */ | ||
(function() { | ||
(function (root, factory) { | ||
if(typeof define === 'function' && define.amd) { | ||
define(['video.js'], function(videojs){ | ||
return (root.Youtube = factory(videojs)); | ||
}); | ||
} else if(typeof module === 'object' && module.exports) { | ||
module.exports = (root.Youtube = factory(require('video.js'))); | ||
} else { | ||
root.Youtube = factory(root.videojs); | ||
} | ||
}(this, function(videojs) { | ||
'use strict'; | ||
var VimeoState = { | ||
@@ -43,9 +53,9 @@ UNSTARTED: -1, | ||
}.bind(this)); | ||
}, | ||
dispose: function() { | ||
this.el_.parentNode.className = this.el_.parentNode.className.replace(' vjs-vimeo', ''); | ||
}, | ||
createEl: function() { | ||
@@ -57,3 +67,3 @@ this.vimeo = {}; | ||
this.videoId = Vimeo.parseUrl(this.options_.source.src).videoId; | ||
this.iframe = document.createElement('iframe'); | ||
@@ -95,3 +105,3 @@ this.iframe.setAttribute('id', this.options_.techId); | ||
} | ||
if(this.options_.poster == "") { | ||
@@ -108,3 +118,3 @@ $.getJSON(this.baseApiUrl + this.videoId + '.json?callback=?', {format: "json"}, (function(_this){ | ||
}, | ||
initPlayer: function() { | ||
@@ -144,5 +154,5 @@ var self = this; | ||
}); | ||
}, | ||
onReady: function(){ | ||
@@ -157,3 +167,3 @@ this.isReady_ = true; | ||
}, | ||
onLoadProgress: function(data) { | ||
@@ -192,3 +202,3 @@ var durationUpdate = !this.vimeoInfo.duration; | ||
}, | ||
error: function() { | ||
@@ -212,3 +222,3 @@ switch (this.errorNumber) { | ||
}, | ||
src: function() { | ||
@@ -256,7 +266,7 @@ return this.source; | ||
}, | ||
supportsFullScreen: function() { | ||
return true; | ||
}, | ||
//TRIGGER | ||
@@ -308,3 +318,3 @@ load : function(){}, | ||
try { | ||
$.getJSON(this.baseApiUrl + this.videoId + '.json?callback=?', {format: "json"}, (function(_uri){ | ||
@@ -316,3 +326,3 @@ return function(data) { | ||
})(uri)); | ||
var image = new Image(); | ||
@@ -402,5 +412,5 @@ image.onload = function(){ | ||
videojs.registerTech('Vimeo', Vimeo); | ||
// Froogaloop API ------------------------------------------------------------- | ||
@@ -669,3 +679,2 @@ | ||
})(); | ||
})(); | ||
})); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
377139
7762