I am passing hard coded value rtmp url & stream name for live streaming in VideoDisplay component of flash player. it is working good and i can able to display video streaming on HTML page.
<s:VideoDisplay width="100%" height="100%" autoPlay="true" >
<s:source>
<s:DynamicStreamingVideoSource host="rtmp://X.X.X.X/live" streamType="live" >
<s:DynamicStreamingVideoItem streamName="rtmpStream"/>
</s:DynamicStreamingVideoSource>
</s:source>
</s:VideoDisplay>
But when i have pass parameter from HTML page it would not working. It is also not given any error but not able to view live video stream on HTML page.
[Bindable]
public var rtmpUrl:String;
[Bindable]
public var rtmpstreamName:String;
/* Assign values to new properties. */
private function initVars():void {
rtmpUrl = FlexGlobals.topLevelApplication.parameters.rtmpUrl;
rtmpstreamName = FlexGlobals.topLevelApplication.parameters.rtmpstreamName;
Security.allowDomain("X.X.X.X");
}
rtmpUrl pass live streaming source and live stream name in rtmpstreamName which passed in to video display component.
<s:VideoDisplay width="100%" height="100%" autoPlay="true" >
<s:source>
<s:DynamicStreamingVideoSource host="{rtmpUrl}" streamType="live" >
<s:DynamicStreamingVideoItem streamName="{rtmpstreamName}"/>
</s:DynamicStreamingVideoSource>
</s:source>
</s:VideoDisplay>
HTML Embed Code:
var flashvars = {};
flashvars.rtmpstreamName = "streamName";
flashvars.rtmpUrl = "rtmp://X.X.X.X/live";
swfobject.embedSWF(
"deepdemo.swf", "flashContent",
"320", "240",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);