Wowza Community

Streaming live to a Flex 4 VideoPlayer

Hi all

The Flex 4 framework brought along the VideoPlayer component, which supposedly can automatically choose the best stream in terms of bitrate from a list of available multi-bitrate streams, play live videos and everything.

See here some information about it.

Here’s a working example for an MXML application under the Flex 4.1 framework:

<s:VideoPlayer width="100%" height="100%">
	<s:source>
		<s:DynamicStreamingVideoSource streamType="live" host="rtmp://88.87.56.214:1935/live/">
			<s:DynamicStreamingVideoItem streamName="euronews_tmo_h.stream" bitrate="19200"/>
			<s:DynamicStreamingVideoItem streamName="euronews_tmo_h.stream" bitrate="9000"/>
			<s:DynamicStreamingVideoItem streamName="euronews_tmo_h.stream" bitrate="3600"/>
		</s:DynamicStreamingVideoSource>
	</s:source>
</s:VideoPlayer>

The streams are valid and they play, and I believe they are served by a Wowza. However, I’m bumping into a problem when the stream is paused: it will not resume.

The player state alternates correctly between ‘playing’ and ‘pause’ when you keep clicking the play/pause button. However, once the first stream pause(or stop) occurs, the image and sound seem to freeze…forever.

Any help ore guidance are most appreciated!

Wowza doesn’t support pausing live streams. You can unsubscribe, stop the stream, then start play again.

I have Flex 4, I’ll try that asap.

Thanks

Richard

You should install the developer edition of Wowza Server on your computer to test with. You can download it here:

http://wowza.com/store.html

Then you can publish your own live stream and subscribe to that with the Flex player example

Richard

You also need the name of a live stream.

Also, the “doPublish” querystring means that they are using version Wowza 1.7.2 and the MediaSecurity package for that version, which uses “SecureURLParams” to secure publishing. (Wowza 2 uses ModuleRTMPAuthenticate).

So that URL and that query string is used in an encoder. (btw, you are revealing too much in a public forum)

It is possible (likely) that there is also connect protection. In that case, you need a url like:

rtmp://ttv-split01-cis.terra.com/origin?doConnect=1234

Using the Flex example player:

Server: rtmp://ttv-split01-cis.terra.com/origin?doConnect=1234

Stream: someStreamName

Richard

Thanks for your response Richard.

It seems you’re right, I may have to reattach the video source to simulate stream resuming.

All I am trying to achieve is simple stream stop and resume, so I suppose I can make it work eventually. I will try to reattach the stream (I am not sure what you mean by ‘unsubscribe’) when PLAY is hit and see how that goes, and i am pretty confident it will do the trick. It’s only common sense that if it started playing before, it can happen again :slight_smile:

Cheers

Liviu

Thank you so much rrlanham,

I’ll use this info to ask the server administrator/team and try to make this work.

This forum was pretty helpful.

Best Regards