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

Continuous play of multiple videos


Hello,

I been at it all day with no luck, I have 2 videos, videoA.mp4 and an rtmp stream, I wan to play videoA.mp4 before the rtmp videoB, but for some reason I cant manage to get it to work, this code keeps repeating videoA.mp4…

Help! =(

jwplayer('playerid').setup({
playlist: [{
image: "",
sources: [{
file: "/videoA.mp4"
},{
file: "rtmp://videoB"
}]
}],
width: '100%',
aspectratio: '16:9',
controls: 'false',
mute: 'true',
autostart: 'true',
autoplay: true,
repeat: 'list'
});

5 Community Answers

jherrieven

User  
0 rated :

Add:

"primary":"flash",

before

repeat: 'list'

Todd

JW Player Support Agent  
1 rated :

James is correct. When our player detects your first source is an MP4, our player will default to HTML5 mode to play the video. Once the RTMP source is attempted, our player will ignore this video since our player is in HTML5 mode and therefore cannot play the RTMP video. Forcing the player to be in Flash mode via primary: ‘flash’ will cause our player to play the first source in Flash mode and then be ready for the RTMP video as well.

onyx808

User  
0 rated :

It didn't work, now the screen just goes black and the repeat button shows up, is like is not switching to the rtmp

this is the updated code

playlist: [{
image: "",
sources: [{
file: "videoA.mp4"
},{
file: "rtmp://videoB"
}]
}],
width: '100%',
aspectratio: '16:9',
controls: 'true',
mute: 'true',
autostart: 'true',
autoplay: 'true',
primary:'flash',
repeat: 'list'
});

am I doing anything wrong?

jherrieven

User  
1 rated :

@onyx808

Change the playlist block to:

playlist: [
{
image: "",
file: "videoA.mp4"
},{
image: "",
file: "rtmp://videoB"
}
],

The way you have it, it is only listing one item to play, but with multiple sources. In this setup only the first source will be played - i'm guessing the MP4 is a short spacer video which is why you are instantly getting the replay icon.

Hope that sorts it!

onyx808

User  
0 rated :

Perfect!, thank you jherrieven!

This question has received the maximum number of answers.