-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
I am using NativeScript with Angular. I want to add JW Player in app to play video for my app.
I already embedded JW Player in Angular Project as follows:-
index.html
<script src="https://cdn.jwplayer.com/libraries/librarykey.js"></script>
home.component.html
<div id="player">This text will be removed.</div>
home.component.ts
`declare var jwplayer: any;
const playerJw = jwplayer('player').setup({
file:'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4',
width: 640,
height: 360,
aspectratio: '16:9',
mute: false,
autostart: true,
primary: 'html5',
});`
I could not figure out how to load JW Player Library in NativeScript. There is no index.html in Nativescript project where I can load the script at the start of application.
How will I load External JS in NativeScript Project? Is there any other way to embed JW Player in Nativescript?
Please help me here.