# Streaming live to a Flex 4 VideoPlayer

**URL:** <https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102>\
**Category:** Wowza Streaming Engine\
**Created:** [July 16, 2010, 1:19pm UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102 "2010-07-16T13:19:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liviu\_Raican](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@Liviu\_Raican](https://community.wowza.com/u/Liviu_Raican)\
**Post date:** [July 16, 2010, 1:19pm UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102/1 "2010-07-16T13:19:32Z")

</div>

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](http://help.adobe.com/en_US/flex/using/WSc78f87379113c38b-669905c51221a3b97af-8000.html) some information about it.

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

```auto
<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!

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 16, 2010, 11:48am UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102/2 "2010-07-16T11:48:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 16, 2010, 4:06pm UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102/3 "2010-07-16T16:06:57Z")

</div>

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](http://wowza.com/store.html)

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

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 16, 2010, 4:56pm UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102/4 "2010-07-16T16:56:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Liviu\_Raican](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@Liviu\_Raican](https://community.wowza.com/u/Liviu_Raican)\
**Post date:** [July 16, 2010, 2:47pm UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102/5 "2010-07-16T14:47:52Z")

</div>

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 🙂

Cheers

Liviu

---

<div class="post-metadata">

**Author:** ![Domenico\_Citrangulo](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Domenico\_Citrangulo](https://community.wowza.com/u/Domenico_Citrangulo)\
**Post date:** [July 16, 2010, 2:14pm UTC](https://community.wowza.com/t/streaming-live-to-a-flex-4-videoplayer/35102/6 "2010-07-16T14:14:53Z")

</div>

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
