Why this error : cannot load m3u8 crossdomain access denied (JWplayer 7.12.6)

1k views Asked by At

I am facing the issue with Jwplayer(7.12.6) to loading .m3u8 video and getting this error message "cannot load m3u8 crossdomain access denied".

And lot of R&D I found replace the url like

  {file: "https://content.jwplatform.com/manifests/xxxxxx.m3u8"}

To

  {file: "https://cdn.jwplayer.com/manifests/xxxxxx.m3u8"}

but the issue has been resovled some of the user system browser. now other user having same issue. still we can not replicate that issue on particular video.

We are using below code to play video of jwplayer

    jwplayer("video416").setup({
     sources: [
      {file: "https://cdn.jwplayer.com/manifests/xxxxxx.m3u8"},
      {file: "https://content.jwplatform.com/videos/XXXXX.mp4"}
    ],    
    image: "https://s3.us-east-2.amazonaws.com/university-video-   cdn/Containers_101_img.jpg",
autostart: false,
controls:true,
controlbar:true,
displayclick:'play'    ,
icons: 'false',
width: '100%',
height: '100%',
primary: "HTML5"    
});

Can you please suggest how to allow or any sotuion to optimize this issue for JWplayer(7.12.6).

1

There are 1 answers

8
Todd On

There is no need to write your own sources: [ ] array for videos that you are hosting on your JW Player account. My suggestion would be to request the JSON URL from their Delivery API. It contains all the metadata (multiple sources, title, image, etc) that they know about this video:

jwplayer("video416").setup({
   playlist: '//cdn.jwplayer.com/v2/media/xxxxxxx',
   image: "https://s3.us-east-2.amazonaws.com/university-video-cdn/Containers_101_img.jpg",
   autostart: false,
   controls:true,
   controlbar:true,
   width: '100%',
   aspectratio: '16:9', 
   primary: "HTML5"    
});

And you should use aspectratio instead of height since most web browsers will not like height set to 100%

You can read more about their Delivery API at https://developer.jwplayer.com/jw-platform/docs/delivery-api-reference/