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

Uncaught ReferenceError: videojs is not defined #1

Closed
blumonn opened this issue Sep 4, 2018 · 4 comments · Fixed by #13
Closed

Uncaught ReferenceError: videojs is not defined #1

blumonn opened this issue Sep 4, 2018 · 4 comments · Fixed by #13

Comments

@blumonn
Copy link

blumonn commented Sep 4, 2018

Hi,

after building the plugin and importing in my project, trying to run the project gives me the following error :

videojs-http-source-selector.es.js:57 Uncaught ReferenceError: videojs is not defined
at eval (videojs-http-source-selector.es.js:57)
at Module../node_modules/videojs-http-source-selector/dist/videojs-http-source-selector.es.js (bundle.js:704)
at __webpack_require__ (bundle.js:20)
at eval (index.js:6)
at Module../index.js (bundle.js:97)
at __webpack_require__ (bundle.js:20)
at bundle.js:84
at bundle.js:87

after some digging, seems like this is a problem related to this generator-videojs-plugin issue, which happened because of something funky with rollup.

How to resolve this? Any help is much appreciated.

@bricesanchez
Copy link

Hi @blumonn, I've the same error, did you find a solution?

@bricesanchez
Copy link

I think the dist is broken in ES :
https://github.com/pivotshare/videojs-http-source-selector/blob/master/dist/videojs-http-source-selector.es.js#L1

Should it be videojs instead of videojs$1 ?

bricesanchez added a commit to bricesanchez/videojs-http-source-selector that referenced this issue Nov 24, 2018
Remove $1 in order to fix
This should fix jfujita#1
@blumonn
Copy link
Author

blumonn commented Nov 25, 2018

@bricesanchez I imported videojs in the components and built the plugin again. that seemed to work for me.

@molten-firescar96
Copy link

Until this is fixed via PR, I've been importing this library as

import videojs from 'video.js';
window.videojs = videojs;
require('videojs-http-source-selector');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants