Flex - is it possible to define the host of a DynamicStreamingVideoSource with a bindable variable?

StackOverflow https://stackoverflow.com/questions/23273544

質問

I'm trying to use a spark VideoPlayer to display video from a streaming video source (using DynamicStreamingVideoSource). This works fine when I hard code the host of the DynamicStreamingVideoSource, but when I try to set the host to a bindable variable the stream does not display. Code:

<s:VideoPlayer id="streamingVideo" width="360" height="240" pauseWhenHidden="true">
    <s:DynamicStreamingVideoSource id="dsvSource" host="{sourceURL}" streamType="live">
        <s:DynamicStreamingVideoItem streamName="my_stream" />
    </s:DynamicStreamingVideoSource>
</s:VideoPlayer>

Using trace statements, I can see the sourceURL is being set correctly. And when I print out the contents of dsvSource.host, I get the correct url. So I'm not sure what I'm doing wrong. Maybe this is a bug in DynamicStreamingVideoSource?

Has anybody experienced this before and maybe know of a workaround? I'm using a bunch of these in my app and I'd prefer to not have to hard code the host url for each one.

役に立ちましたか?

解決

Ended up using the deprecated mx:VideoDisplay component instead of the spark VideoPlayer. It was able to successfully use a bindable variable to define the host URL. Seems like the DynamicStreamingVideoSource component has a bug that doesn't allow this.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top