Streaming an FLV Using Spark VideoPlayer/VideoDisplay

Written by

I had a head banging moment last night trying to help a mate out to stream an FLV from Akamai (also seen on Wowza) using the latest Spark VideoPlayer component. We had a working flv streaming in the old mx:VideoDisplay absolutely fine, update the component to the Spark equivalent and nothing, nowt, nada, not even a glimmer?

1
2
// OLD MX COMPONENT - WORKS FINE
<mx:VideoDisplay source="rtmp://myserver.com/my_application/my_stream.flv" />
1
2
// NEW SPARK COMPONENT - DOES NOT WORK!!
<s:VideoDisplay source="rtmp://myserver.com/my_application/my_stream.flv" />

My first thought was I that when the component was upgraded, the syntax was changed for defining the source string? After a chat with Stefan he also mentioned that as the VideoPlayer/VideoDisplay is now built on OSMF this would most likely be the case.

I then started looking through the docs to find out what the syntax is for streaming an FLV in the latest spark components (a fairly common practice I would have thought), damned if it was a quick find for me! The typical example I found was as below:

1
source="rtmp://fmsexamples.adobe.com/vod/mp4:_cs4promo_1000.f4v"

Then we started playing with DynamicStreamingVideoSource and I stumbled over the thought that I should dig into OSMF documentation more and eventually found the solution but buggered if I can find it again and I flippin’ forgot to bookmark (there may be alternatives but this worked):

1
2
// WORKS!!!
<s:VideoDisplay source="rtmp://myserver.com/my_application/?streamName=my_stream&streamType=flv" />

Comments