I’m trying to add an HTML5 video wrapper called Videogular to my ionic 3 app. Everything is working fine except for the icons. The guys at Videogular have their own icon fonts and corresponding scss file that defines how the player looks. These are placed in the videogular directory under node modules. How do I get them to work with my ionic app i.e in my component’s scss file. Any help is greatly appreciated.
Found the solution. I’ll post it here in case any one else faces the same problem.
Here’s what I did:
1 Navigated to node_modules\videogular2\fonts\videogular.css and changed the file name to videogular.scss
Please do not follow the above advice. Editing anything under node_modules is a very bad idea. npm owns that directory, and it will blow away your modifications.
Thank you @rapropos
This is actually safer and cleaner. I just need to move the changes from the node_modules files to my own files outside that folder and use the ‘config’ property in ‘package.json’ to point to the new files.
OK - I got it going using the following procedure - this is based on Rapropos’ and Gizm0’s advice - just adding this for anyone that may find it useful…
1 - Create folder: ‘scripts’ with files ionic.copy.config.js and ionic.sass.config.js
These are copies of the @ionic/app-scripts/config folder, changed as follows:
ionic.copy.config.js
2 - Create folder 'videogular2_scripts containing a copy of the fonts folder (including folder). Rename videogular.css to videogular.scss and change the code at the beginning to:
Hi Ronandoherty,
thx for sharing. Your demo works fine but when I try to get videogular integrated in my current project (newest Ionic)
I can’t get it work. I get the error that ng-video is not know.
Could you maybe make a short description of the steps needed for integrating?
thx,
patrik
Edit: I mentioned in a SideMenu - I Meant to say in a project using SplitPane.
Anyone have any luck getting fullscreen to work in an Ionic SplitPane project?
For me. fullscreen produces a white page or displays anything I have on the index.html.
Hi Patrickd,
The input comes a bit late but it might be useful to others.
If you follow RonanDoherty implementation and make the imports of videogular2 in the .module file of the page that will use it (and not in the app.module.ts), Videogular2 plays fine but the icons of the vg-controls don’t display correctly (only squares appear), which leaves the question of this thread open for lazy loaded ionic3 apps.
I get the following error:
GET http://localhost:8100/build/videogular.woff?hj1wei net::ERR_ABORTED
GET http://localhost:8100/build/videogular.ttf?hj1wei net::ERR_ABORTED
Any input on that is appreciated.
cheers
// Edit –
I had to play a bit with the paths and naming of files, but I got it to work mixing the solution from @dbertels and @ronandoherty. Thanks guys for the input.
So videogular2 works with Ionic3 and lazy loading.
hi, how to play video which is stored in internal storage, and play in videogular2 player in ionic3.
I am bit frustrated to finding solution for this.
can you please tell, how to play this video which is downloaded internal storage for android and ios.