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

Live stream feeds in creating a playlist


I have read the following article: https://support.jwplayer.com/customer/portal/articles/1480872-example-creating-an-html-playlist

Has anybody used an external URL/stream in this setup? I am basically wanting to create a "player" with three feeds that will allow the user to select a specific feed of their choosing. This article is based off an uploaded file. All my feeds will be live.

1 Community Answers

Alex

JW Player Support Agent  
1 rated :

Hi there,

You should be able to accomplish what you are trying to do by replacing any reference to a MP4 file in those code examples with URLs to your live streams. For example, if your default live stream’s URL was http://www.example.com/stream.m3u8, the first code example on that page would become:

<div id="myElement"></div>

<script>
var playerInstance = jwplayer("myElement");
playerInstance.setup({
	image: "/uploads/myPoster.jpg",
	file: "http://www.example.com/stream.m3u8",
	title: "My Cool Trailer"
});
</script>

The same thing would apply when providing the options to load the other streams. For example, the third code example on that page would look like this:

<li><a href="javascript:loadVideo('http://www.example.com/stream.m3u8','image1.jpg')">Video 1</a></li>
<li><a href="javascript:loadVideo('http://www.example.com/stream2.m3u8','image2.jpg')">Video 2</a></li>
<li><a href="javascript:loadVideo(http://www.example.com/stream3.m3u8','image3.jpg')">Video 3</a></li>

This question has received the maximum number of answers.