https://www.wowza.com/docs/how-to-use-longtail-jw-player-5-with-wowza-media-server
The code is in the .fla file. You will need Adobe Flash CS3/CS4 to edit it.
Charlie
Add the call:
connectLivePlayer(null);
To the bottom of the ActionScript.
Of course you will need to pre-set the RTMP URL and stream name and hide the controls.
Charlie
We don’t have a volume control. You will need to add one. We do not have any suggest code for volume controls.
Charlie
This seems very player specific. I guess I might contact the JW Player team.
Charlie
Edit the file: com.longtailvideo.jwplayer.media/RTMPMediaProvider.as
Change the onMetaData handler to the code below, change the 320 and 240 values to the frame size of your video and publish the new player:
public function onData(dat:Object):void { if (dat.width) { _video.width = dat.width; _video.height = dat.height; resize(_width, _height); } else { _video.width = 320; _video.height = 240; model.mediaHandler(video); } if (dat.duration && item.duration < 0) { trace("duration " + dat.duration); item.duration = dat.duration; } if (dat.type == 'complete') { complete(); } else if (dat.type == 'close') { stop(); } if (config.ignoremeta != true) { sendMediaEvent(MediaEvent.JWPLAYER_MEDIA_META, {metadata: dat}); } }
Have you even tried the above code?
Hi Richard,
I’m having trouble playing a live stream with JWP5. The first few frames of video come up along with a tenth of a second of audio but then it freezes and shows the spinning icon. The Wowza server version is 1.7.2. I tried Wirecast and Adobe FME with the same results. Here’s the code used:
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="400" height="315">
<param name="movie" value="player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="bufferlength=2&streamer=rtmp://{server-ip}/live&file=remotestream.flv&provider=rtmp" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="player.swf"
width="400"
height="315"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="bufferlength=2&streamer=rtmp://{server-ip}//live&file=remotestream.flv&provider=rtmp"
/>
</object>
Thanks for the tutorial,
Bill
Try entering this url into the same browser window. What do you get?
http://192.168.1.99:1935
When you try to play the stream with JW Player, do you see any log messages in the Wowza logs?
Charlie
Then it could be step #5 in the instructions. If the security isn’t setup properly then it will not attempt to connect. Try either following those steps or host the player at a web server and access it using a URL.
Charlie
I went back and tried this myself. I could not get JW Player 5 to work either. I finally reverted to JW Player 4.6 from here:
http://www.longtailvideo.com/players/jw-player-4-for-flash
My HTML code looks like this:
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">
<param name="movie" value="player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="provider=rtmp&bufferlength=2&streamer=rtmp://[wowza-ip-address]/live&file=test2.flv" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="player.swf"
width="328"
height="200"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="provider=rtmp&bufferlength=2&streamer=rtmp://[wowza-ip-address]/live&file=test2.flv"
/>
</object>
You will need to update the RTMP URLs in two places.
Charlie
You can edit our player using Adobe Flash CS3/CS4. You can try FlowPlayer.
Charlie
Right, we are just waiting for JW Player 5.1 to be released.
Charlie
Obviously you found an error. Congratulations. I updated the posting.
Richard
Try with “provider” Flashvar:
Flashvars="bufferlength=2&streamer=rtmp://{server-ip}/simplevideostreaming&file=mp4:Extremists.m4v&provider=rtmp"
Also, try without the mp4: prefix. (however you probably do need this with m4v extension, but try without)
Flashvars="bufferlength=2&streamer=rtmp://{server-ip}/simplevideostreaming&file=Extremists.m4v&provider=rtmp"
Client-side playlist in JW Player are done with xml. See the JW tutorials, there are a lot of options, but the main thing you do is change the “file” flashvar to point to an xml playlist.
&file=playlist.xml
Richard
I’m glad it’s working. I am pretty sure that the only one that made a difference is “provider=rtmp”
Richard
The player should be on a web server. Or you can run it from file explorer on your computer.
I suggest to put JW player aside for a minute, and get this working using the SimpleVideoStreaming example player, which is located here:
[wowza-install-dir]/examples/SimpleVideoStreaming/client/
All the files in this folder should be run from a web server, or just directly from file explorer on your computer.
In Wowza, for this example, all you need is an empty folder here:
[wowza-install-dir]/applications/SimpleVideoStreaming
Richard
Glad it’s working!, anyway.
Richard
It’s not going to be a relative link or http url (unless you are doing progressive download) even if on the same machine.
I’m not that familiar with xspf format, but here is an RSS playlist:
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
<channel>
<item>
<jwplayer:streamer>rtmp://localhost/vod</jwplayer:streamer>
<media:content url="somevideo.mp4"/>
</item>
</channel>
</rss>
“somevideo.mp4” has to be located where /conf/vod/Application.xml /StorageDir points to
Richard
To use the jwplayer:streamer you have to include the namespace in the header:
xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats
To display the playlist, you have to include “playlist” flashvar “&playlist=right” (or bottom or over), and “playlistsize” “&playlistsize=200”, and you have to make the player big enough by increasing the width (or height if playlist=bottom).
So to display a playlist that is 200 wide, increase the width of the player by 200:
<object id=“player” name=“player” width=“600” height=“315”>
Richard
Martin,
It can be difficult. Can you post this on JW forum also? I’ve got stuck on playlists before myself and got help there. That’s where I found out about jw namespace in playlist.
If you do get an answer there, and post back here, it would be appreciated.
Richard