简体   繁体   中英

jwplayer is not loading when using external js file

I used jw player ads edition and seems my code not work.i used external js configuration file..Not sure what the really issue..looking for support . Thanks!.

my code:

in external js file: i put following code: HTML source:

jwplayer("my-video").setup({
  file: file,

  aspectratio: "16:9",
  skin: {
    name: "five",
    active: "red",
    inactive: "white",
    background: "black"
  },
  width: width,
  height: height,
  primary: primary,
  advertising: advertising
});

in pre.html

I put following code:

<script type="text/javascript">

var file: "https://s3.amazonaws.com/aws-website-awsvideouploadvastadscustomizer-f3qi3/videos/JACKALS+Trailer+(2017)+Horror+Movie.mp4",
var width: "580",
var height: "360",
var primary: "flash",
var advertising: { 
  var client: "vast",
  var schedule: {"ad tag"}
};
</script>

First of all you need to set the JW-Script URL ( https://support.jwplayer.com/customer/portal/questions/16758746-cdn-url ). In the dashboard you can set the height and width of the player and color things.

Then you need to set-up the JW Player (say that the div #my-video is the player and then you need to set-up the file)

var playerInstance = jwplayer("my-video");

playerInstance.setup({
    'file' : 'https://s3.amazonaws.com/aws-website-awsvideouploadvastadscustomizer-f3qi3/videos/JACKALS+Trailer+(2017)+Horror+Movie.mp4',
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM