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

JWplayer Configurations - HLS setup


Good Day all,

Hoping someone can see where it is I'm going wrong here, have only the fundamental knowledge here.

I have my video Element
[code]
<div class="embed-responsive embed-responsive-16by9 actionable-video">
<div id="myElement" class="embed-responsive-item" data-video="<?php ECHO $VideoPath ?>">
Loading the player...
</div>
<div id="hotspots"></div>
</div>
[/code]

then later I have the Configuration
[code]
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
var preBufferDone = true;
playerInstance.setup({
file: $("#myElement").data("video"),
stretching: "uniform",
width:"100%",
aspectratio:"16:9",
autostart: true,
tracks: [{
file: 'assets/vids/Gugu.srt',
label: 'Zulu',
default: true
}] ,
captions: {
edgeStyle: 'uniform',
backgroundOpacity: '0',
}
});
playerInstance.setVolume(50);
</script>
[/code]

Now I have a new setup to have Dynamic Bit rates, so i see the code when testing the Demo is
[code]
{
"playlist": [
{
"sources": [
{
"default": false,
"file": " **** ",
"label": "0",
"type": "hls",
"preload": "none"
}
]
}
],
"primary": "html5",
"hlshtml": true,
"autostart": true,
"id": "stream-tester-player-https"
}
[/code]

but I don't seem to be having luck when i try setup like this it keeps saying no playable source found,

[code]
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
var preBufferDone = true;
playerInstance.setup({
"playlist": [ {
"sources": [ {
"default": false,
"file": "<?php ECHO $VideoPath ?>",
"label": "0",
"type": "hls",
"preload": "none"
} ]
} ],
"primary": "html5",
"hlshtml": true,
"autostart": true,
"width":"100%",
"aspectratio":"16:9",
});
playerInstance.setVolume(50);
</script>
[/code]

not sure what it is I'm doing incorrectly here.

7 Community Answers

Todd

JW Player Support Agent  
0 rated :

What is the actual video path that gets loaded?

Can you provide a link to a test page so we can see the output of your PHP?

info

User  
0 rated :

Morning Todd,
I apologize for the late responce.

I have the basics up temporarily for testing on
http://www.digitalcarnage.co.za/JWTest/

The file its loading is at
http://za-stream-01.teevee.africa:1935/cumulusblue/smil:testvideo.smil/playlist.m3u8

I have stripped it down to the absolute basics of what I'm trying to do, removed my hotspots etc to no avail.
I'm definitely missing something somewhere.

thanks in advance for any assist you can give me

Todd

JW Player Support Agent  
0 rated :

Look at the HTML and Javascript in the page source at http://www.digitalcarnage.co.za/JWTest/ :

<div id="myElement" class="embed-responsive-item" data-video="">

	<script type="text/javascript">
		var playerInstance = jwplayer("myElement");
		var preBufferDone = true;
		playerInstance.setup ( {
			playlist: [ {
				sources: [ {
					default: false,
					file: $("#myElement").data("video"),
					type: "hls",
					preload: "none"
				} ]
			} ],
			primary: "html5",
			hlshtml: true,
			autostart: true,
			width:"100%",
			aspectratio:"16:9",
		});
		console.log();

		playerInstance.setVolume(50);
	</script>

There is no data-video, so the file: ‘’ is blank. Can you try inserting your HLS URL directly into the file: ’’ instead?

Your HLS URL is playing in our HTTP stream tester at http://demo.jwplayer.com/developer-tools/http-stream-tester/, so I would expect it will play on your side too.

Hope this helps,
Todd

info

User  
0 rated :

Morning Todd, Yes sorry must have checked it just before i corrected it, I misstyped the php echo of the variable. i did correct it but to no avail.

I have even set it to directly use the URL for the stream and have that up as well.

With the Stream URL directly in the Java setup:
http://www.digitalcarnage.co.za/JWTest/index2.php

but sadly still giving me no playable sources found.

Todd

JW Player Support Agent  
1 rated :

Your code works correctly in JW 7.12.11, but not in the 7.3.6 version you have on your page. My first suggestion is to simply update your player on the page.

JW 7.3.6 still uses Flash for HLS playback in all browsers except Safari, so if using JW 7.3.6 is a requirement for you, you will need to remove two lines from your player config:

primary: "html5",
hlshtml: true,

But now that more and more browsers are getting very aggressive about blocking Flash, updating the player on the page is a better option. An even better player to update to would be JW8, as this is the newest version that will be getting even more features and bug fixes in the future. JW7 development has ended.

Hope this helps. Please let me know if you have any other questions,
Todd

info

User  
0 rated :

Aaaah that explains it then, Thanks Todd,
Did not realize that 7.3.6 was not able to do so. I have updated and works 100% thank you so much for the assistance.

Todd

JW Player Support Agent  
0 rated :

You’re welcome. I am glad to hear it is working now!

I will mark this support case as closed, but certainly contact us again if you have any other support questions or concerns.

This question has received the maximum number of answers.