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

Streaming a video onClick JWPlayer 7


<a href="#" onclick="jwplayer('VideoPlayer').load({file:'video.mp4',provider: 'rtmp',streamer:'rtmp://10.10.1.1/vod'}).play();">Title</a>

This use to work on jwplayer 6 and every other version. Version 7 isnt working.

Ive tried
<a href="#" onclick="playerInstance.load({file:'video.mp4',provider: 'rtmp',streamer:'rtmp://10.10.1.1/vod'}).play();">Title</a>

and many other ways to load the video, Ive changed the video embed to
<div id='VideoPlayer'>Loading the player ...</div>

<script type='text/javascript'>
var playerInstance = jwplayer('VideoPlayer');
playerInstance.setup({
file: 'rtmp://10.10.1.1/vod/mp4:video.mp4',
image: 'http://10.10.1.1/jwplayer7/video.jpg',
});
</script>

The RTMP is working, the player loads the default video, but when I click my linked video I get: Error loading media: File could not be played.

<a href="#" onclick='playerInstance.play()'>Toggle playback</a> does work, it allows the player to play a video with an external link.

I know the player is setup correctly and that the external play button will work. I also know the RTMP streaming is working correctly. I just dont know if my video is being loaded, or do I need to change the provider terminology.

Any help would be greatly appreciated.
Thanks

3 Community Answers

Todd

JW Player Support Agent  
0 rated :

Haven’t tested this yet (since I am on the train at the moment) but try adding primary: ‘flash’ to your load() call. JW 7 does not load directly in Flash mode like JW 6 used to, so maybe this would help.

dtrevino15

User  
0 rated :

Figured it out finally. Had to change a bunch of stuff, and a library of over 1000 videos, I will have to do some fancy foot work.
My configuration is embedded into SharePoint. A simple list just gets filled out with the video title, application or location and folder. You can also add a thumb, and running time and SharePoint does the reset. Pretty cool for a Video Library.

Hope this helps someone else.

<div id='VideoPlayer'>Loading the player ...</div>

<script type='text/javascript'>
var playerInstance = jwplayer('VideoPlayer');
playerInstance.setup({
file: 'rtmp://10.10.1.1/VOD/mp4:Video.mp4',
image: 'Video.jpg',
title: 'My Cool Video',
primary: 'flash',
rtmp: {
bufferlength: 10,
subscribe: true,
},
skin: {
name: "bekle"
},
width: 640,
height: 480,
});
</script>

<script>
function loadVideo(myFile,myImage) {
playerInstance.load([{
file: myFile,
image: myImage
}]);
playerInstance.play();
};
</script>

<li><a href="javascript:loadVideo('rtmp://10.10.1.1/VOD/mp4:Video 2.mp4','image1.jpg')">Video 2</a></li>
<li><a href="javascript:loadVideo('rtmp://10.10.1.1/VOD/mp4:Video 3.mp4','image2.jpg')">Video 3</a></li>

Olga

User  
0 rated :

Hello.
How to set, by clicking on a link, the cursor on track with the necessary index of the set playlist? And run it?
For example: I have a element: <li id="1" class="jwitem active">, ID corresponds to the index in the song of the playlist.

This question has received the maximum number of answers.