Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix videojs-vimeo #156

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/Vimeo.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import videojs from 'video.js';
import VimeoPlayer from '@vimeo/player';

const Component = videojs.getComponent('Component');
const Tech = videojs.getComponent('Tech');
const Tech = videojs.getTech('Tech');

let cssInjected = false;

// Since the iframe can't be touched using Vimeo's way of embedding,
Expand Down Expand Up @@ -131,7 +131,7 @@ class Vimeo extends Tech {
}

createEl() {
const div = videojs.createEl('div', {
const div = videojs.dom.createEl('div', {
id: this.options_.techId
});

Expand Down Expand Up @@ -206,6 +206,10 @@ class Vimeo extends Tech {
ended() {
return this._vimeoState.ended;
}

playbackRate() {
return 1;
}

// Vimeo does has a mute API and native controls aren't being used,
// so setMuted doesn't really make sense and shouldn't be called.
Expand Down Expand Up @@ -263,7 +267,6 @@ Vimeo.nativeSourceHandler.dispose = function() { };

Vimeo.registerSourceHandler(Vimeo.nativeSourceHandler);

Component.registerComponent('Vimeo', Vimeo);
Tech.registerTech('Vimeo', Vimeo);

// Include the version number.
Expand Down