Is there any possible way to use videojs library in ionic 3 ? Thanks in advance
Asked
Active
Viewed 3,562 times
2

Sampath
- 63,341
- 64
- 307
- 441

Abhijeet Nigoskar
- 21
- 1
- 2
-
Do you need to play videos on Ionic 3 app or you must need to use above library? – Sampath Sep 13 '17 at 10:35
-
I need to play in ionic app . Do you have any idea ? Because when i try to install videojs through npm , i got this error "Cannot find module "safe-json-parse/tuple". And when i try with the cdn link then i got this error " Specified “type” attribute of “application/x-mpegURL” is not supported. Load of media resource https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8 failed. All candidate resources failed to load. Media load paused. Cannot play media. No decoders for requested formats: application/x-mpegURL" – Abhijeet Nigoskar Sep 13 '17 at 10:58
1 Answers
2
You can easily use native video Player plugin for that.
A Cordova plugin that simply allows you to immediately play a video in fullscreen mode.
ionic cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git
npm install --save @ionic-native/video-player
OR You can use HTML 5 video tag
:

Sampath
- 63,341
- 64
- 307
- 441
-
Thank you but i neeed to show that player in ionic view , which is not possible in the case of native plugin. – Abhijeet Nigoskar Sep 13 '17 at 12:46
-
`videojs` uses HTML 5 player. So can't you use it without that library? See this: https://forum.ionicframework.com/t/ionic-and-html5-video-tag/78030/2 – Sampath Sep 13 '17 at 13:08