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.getComponent is not a function / videojs is not defined #13

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

zarqman
Copy link
Contributor

@zarqman zarqman commented Apr 2, 2019

Fixes videojs.getComponent is not a function / videojs is not defined.

Imports video.js into each component, which eliminates the following error (and similar variations) when using video-http-source-selector with webpack:

videojs-http-source-selector.es.js:36 Uncaught TypeError: videojs.getComponent is not a function
    at Module.<anonymous> (videojs-http-source-selector.es.js:36)
    at Module../node_modules/videojs-http-source-selector/dist/videojs-http-source-selector.es.js (videojs-http-source-selector.es.js:264)

This change also resolves compiled output in dist/ mixing up use of videojs and videojs$1.

Fixes #1 and succeeds #3.

(Only src/ included as I assume you'd prefer to rebuild dist/ yourself, but can add that to the PR if you prefer.)

aka videojs is not defined

Adds import video.js into each component, which eliminates the following error when
using video-http-source-selector with webpack:

```
videojs-http-source-selector.es.js:36 Uncaught TypeError: videojs.getComponent is not a function
    at Module.<anonymous> (videojs-http-source-selector.es.js:36)
    at Module../node_modules/videojs-http-source-selector/dist/videojs-http-source-selector.es.js (videojs-http-source-selector.es.js:264)
```

This change also resolves compiled output in dist/ mixing up use of `videojs` and `videojs$1`.
@jfujita jfujita merged commit 8d15ccf into jfujita:master Apr 5, 2019
@jfujita
Copy link
Owner

jfujita commented Apr 5, 2019

Thanks @zarqman

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

Successfully merging this pull request may close these issues.

Uncaught ReferenceError: videojs is not defined
2 participants