videojs / videojs-vimeo

Support Vimeo source for Video.js
MIT License
196 stars 204 forks source link

Importing videojs-vimeo using ES6 #67

Closed howells closed 8 years ago

howells commented 8 years ago

I'm trying to import videojs-vimeo as an ES6 module, which works great with the videojs-youtube plugin but not this. I tried emulating the code in the videojs-youtube script but am not very very far! What do I need to do?

eXon commented 8 years ago

I need to make sure it is compatible with CommonJS / RequireJS. I'll try to fix it when I have a few minutes.

howells commented 8 years ago

That would be amazing :-) thanks

eXon commented 8 years ago

Should work if you use 2.0.2.

howells commented 8 years ago

Awesome!

Only prob I'm getting now is Uncaught ReferenceError: $ is not defined on line 104; not sure how to get around that (sorry, am a noob)

howells commented 8 years ago

Sorry to chase, wondered if you knew what I might be doing wrong? I'm importing like so:

import $ from 'jquery'
import VideoJs from 'video.js'
import VideoJsYouTube from 'videojs-youtube'
import VideoJsVimeo from 'videojs-vimeo'
import Velocity from "velocity-animate"
import * as Config from "./config"