Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Help doc with Angular 5 #1346

Closed
CalibanAngel opened this issue Feb 18, 2018 · 4 comments
Closed

Help doc with Angular 5 #1346

CalibanAngel opened this issue Feb 18, 2018 · 4 comments

Comments

@CalibanAngel
Copy link

Hi

I was trying to use videojs and video-contrib-hls with Angular 5 and it didn't work at all. So after trying few things I finally succeed to use it. So this is what I did to fix my problems.

I use in my package.json :

"devDependencies": { 
       "video.js": "^6.6.3" 
}
"dependencies": { 
       "videojs-contrib-hls": "^5.12.2" 
} 

Actually i don't know for others version but it works with these one.

You should add in angular-cli.json :

"script": [
        "../node_modules/video.js/dist/video.min.js",
        "../node_modules/videojs-contrib-hls/dist/videojs-contrib-hls.min.js"
]

And in your my-component.component.ts :

import ...
declare var videojs: any;

I hope it will help someone.

@gaglage
Copy link

gaglage commented Mar 3, 2018

Thanks a lot. I'll chek it because I'll need it soon. Only a consideration the property in angular-cli.json "scripts" .

@gesinger
Copy link
Contributor

Thanks for sharing @CalibanAngel . Going to close this ticket though as it isn't a current issue.

@vakuzmin
Copy link

vakuzmin commented Apr 9, 2018

please don't forget to include as well

"../node_modules/video.js/dist/video-js.min.css",

moreover here is the link to the custom component guide

https://www.arroyolabs.com/2017/03/angular-2-videojs-component/

@lahbib
Copy link

lahbib commented Dec 17, 2018

import { videojs } from "video.js";

is the simplest way :)

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

No branches or pull requests

5 participants