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

Missing protocol breaks m3u8 while loading smil doesn't have any issues.


We are updating our encoder/streaming server to move from RTMP to HLS. An example of what the setup json object is below. If the file I am attempting to serve in the the sources array does not have a protocol (http or https) for smil files, JWPlayer gets the proper protocol and loads the file. If I am attempting to use a m3u8 file, JWPlayer tries to load the file relative to the current domain instead of getting the protocol and loading it properly.

So, if the file is a smil file like "//video.domain.com/m3u8/de24k9.smil", I see a request go to "https://video.domain.com/m3u8/de24k9.smil" like I expect.

If the file is a m3u8 file like "//video.domain.com/m3u8/de24k9.smil" I see a request go to "https://current-domain.com/video.domain.com/m3u8/de24k9.smil".

What can we do to fix this?

{
playlist: [{
image: 'https://image-url/uri',
sources:[{
file: '//video.domain.com/m3u8/de24k9.m3u8'
}]
}

1 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

Interesting issue – one workaround you could definitely use would be to use: window.location.protocol
file: window.location.protocol + ‘//video.domain.com/m3u8/de24k9.m3u8’

-Cooper

This question has received the maximum number of answers.