Skip to content

Commit 576daaf

Browse files
vimeo: eslint
1 parent b2a3271 commit 576daaf

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎rollup.config.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default [
1111
format: 'umd',
1212
sourcemap: true,
1313
globals: {
14-
jquery: '$'
14+
jquery: '$',
1515
}
1616
},
1717
plugins: [nodeResolve(), commonjs()],

‎scripts/vimeo.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ function addVimeoFunctions(AblePlayer) {
3131
// - It automatically loops (but this can be overridden by initializing the player with loop:false)
3232
// - It automatically sets volume to 0 (not sure if this can be overridden, since no longer using the background option)
3333

34-
autoplay = (this.okToPlay) ? 'true' : 'false';
35-
3634
if (this.playerWidth) {
3735
if (this.vimeoUrlHasParams) {
3836
// use url param, not id
@@ -63,6 +61,8 @@ function addVimeoFunctions(AblePlayer) {
6361
}
6462
}
6563

64+
// Vimeo must be loaded by now
65+
// eslint-disable-next-line no-undef
6666
this.vimeoPlayer = new Vimeo.Player(containerId, options);
6767

6868
this.vimeoPlayer.ready().then(function() {
@@ -228,7 +228,8 @@ function addVimeoFunctions(AblePlayer) {
228228
return promise;
229229
};
230230

231-
AblePlayer.prototype.getVimeoPosterUrl = function (vimeoId, width) {
231+
AblePlayer.prototype.getVimeoPosterUrl = function (vimeoId) {
232+
const thisObj = this;
232233

233234
// Vimeo Oembed only returns a 640px width image. Hope at some point there's an alternative.
234235
var url = 'http://vimeo.com/api/oembed.json?url=https://vimeo.com/' + vimeoId, imageUrl = '';
@@ -261,6 +262,7 @@ function addVimeoFunctions(AblePlayer) {
261262
// as a url parameter, not as an id parameter
262263
this.vimeoUrlHasParams = false;
263264

265+
let urlObject;
264266
if (typeof url === 'number') {
265267
// this is likely already a vimeo ID
266268
return url;

0 commit comments

Comments
 (0)