Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

hlshtml setting


Hi,

I recently tried to update our site so that modern browsers such as Chrome will default to using HTML 5 rather than Flash for the display of the JWPlayer 7.7.4 instance when playing HLS content.

When I add the "hlshtml: true" setting to my already working JWPlayer instances I receive a player error message.

If the path to the video's manifest file uses the http protocol I get a "Cannot load M3U8: Unable to fetch HHTP resource over HTTPS" error message.

If the path to the video's manifest file uses the https protocol I get a "Cannot load M3U8: Crossdomain access denied" error message.

If I remove the "hlshtml: true" then the videos will play regardless of whether the video's manifest file is accessed via the http or https protocol.

I had expected that a https page hosting a JWPlayer instance should be able to access HLS content via either the http or https protocol, and that one should be able to just add the "hlshtml: true" setting to a working JWPlayer instance was defaulting to using Flash to have it render JWPlayer in HTML 5.

Is there something I'm missing, is this a HTML 5 issue or is there an issue with JWPlayer when rendered in HTML 5 mode.

My test site can be found at https://webtest.destiny.com.au, and I'm hosting the video content on AWS CloudFront via the hostname content.destiny.com.au.

Thanks in advance.

Les

6 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi Les,

My name is Alex and I am one of the Team Leads of the Support Team at JW Player. I will be more than happy to assist you with your questions.

When your site is being served securely (HTTPS), it cannot request non-secure (HTTP) resources. This is not a limitation of the player and happens most of the time when requesting non-secure content on secure pages. Even when the browser does load the non-secure resource, it does compromise the security of the entire page. You can read more about this on this page on Google’s Developer site.

The “Crossdomain Access Denied” error message you are receiving when trying to embed the HLS stream in HTML5 is due to the CORS headers not being set up properly on the domain hosting the stream (content.destiny.com.au) to properly allow the domain requesting the content (webtest.destiny.com.au) access. Cross-domain policies apply per sub-domain so even though these two locations are on the same site, the same rules apply. The reason why this does not happen for you when the player is rendering in Flash is because Flash uses a different method for checking to see if the request is authorized to go through. You can read more about cross-domain file loading, including information on how to resolve this, on our Cross-domain File Loading support article.

Please let me know if you need any more help or have any other questions.

Thank you!

A...

User  
0 rated :

Hi,

Thanks for the response. I'll look into setting up a AWS cloudfront CORS configuration.

I wasn't ware that of CORS so didn't realise I needed to configure it.

I didn't have any issues with JWPlayer playing HLS content in Safari or Edge using in HTML 5 mode when we first moved to using HLS content in place of the IIS smooth streaming content we were using.

It was only when trying to configure Chrome to use HTML 5 rather than Flash that I experienced this issue

I have a suitably configured crossdomain.xml as that is what was required for Flash and Silverlight.

Les

A...

User  
0 rated :

Hi,

I seem to have resolved the CORS issue, but their appears to be a video playing issue in the current build of Google Chrome (54.0.2840.87 m) when using the "hlshtml: true" setting.

For Audio and Video files which are embedded in a page you seem to need to click play twice. On the first click the player seems to connect to the hls media stream, but the playback stops almost immediately and you have to click play a second time to play the content.

For Audio and Video files which are loaded via JS and have "autostart: true" setting the player seems to connect to the hls media stream, but the playback stops almost immediately and you have to click play a second time to play the content.

All seems to work correctly in the current build of Mozilla Firefox when using the "hlshtml: true" setting.

Safari and Edge seem to still work correctly when using the "hlshtml: true" setting.

Les

Alex

JW Player Support Agent  
0 rated :

Hi Les,

I went back to https://webtest.destiny.com.au/ and can see how the HLS streams are now playing in HTML5 for me. I am not seeing the issue with the content automatically stopping right after it starts. When I click on the “How we help properly investors” and “Watch Margaret’s latest video blog” videos and they pop up in overlays, the begin playing and do not stop until the complete. I tested this with Chrome 54.0.2840.87 (64-bit) on macOS Sierra and 54.0.2840.87 m on Windows 10.

Can you try clearing your cache in Chrome and trying again?

Thank you.

A...

User  
0 rated :

Hi,

The stalled palyback seemed to be specific to my Chrome user profile.

It didn't work using that profile on 3 separate PC's even after clearing the cache.

If works on the same PC's when I switch from my business to my personal chrome user profile, and when I used a new local user profile.

Thanks for your assistance.

Les

Alex

JW Player Support Agent  
0 rated :

Hi Les,

That is odd – I cannot think of anything that would cause that behavior to happen on a specific user profile on Chrome besides perhaps a extension that you have installed in your Chrome user profile.

Thank you.

This question has received the maximum number of answers.