Copy link to clipboard
Copied
I'm trying to get Flex Builder 3 to play a live video stream with Flash Media
Server and Flash Live Media Encoder.
I'm able to stream pre-recrorded (vod) flvs in flex from flash media server.
I'm able to stream live video using Flash/FMS/Flas Live Media Encoder, but not
with Flex.
This code streams pre-recorded Video on Demand flvs, but not live streams:
If I change source to "rtmp://localhost/live/livesream.flv, I get nothing.
What am I doing wrong?
<?xml version="1.0"?>
<!-- controls\videodisplay\VideoDisplayFMS.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:HBox>
<mx:Label text="RTMP FMS 2.0"/>
<mx:VideoDisplay
autoBandWidthDetection="false"
source="rtmp://localhost/vod/Legend.flv"/>
</mx:HBox>
</mx:Application>
Oh and sorry for the double post. I didn't know there was a seperate FMS forum.
I don't use the video display component, but it does have a "live" property. Try setting that to true. if it still doesn't work, try removing the .flv extension from the stream name.
Copy link to clipboard
Copied
I don't use the video display component, but it does have a "live" property. Try setting that to true. if it still doesn't work, try removing the .flv extension from the stream name.
Copy link to clipboard
Copied
That worked! Thanks *very* much. Stupid of me to forget to set the live attribute to true. Also removed the .flv. BTW: what video component do you prefer?
Here's the working code:
<?xml version="1.0"?>
<!-- controls\videodisplay\VideoDisplayFMS.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:HBox>
<mx:VideoDisplay
live="true"
autoBandWidthDetection="false"
source="rtmp://localhost/live/livestream"/>
</mx:HBox>
</mx:Application>
Copy link to clipboard
Copied
I tend to roll my own components that extend UIComponent, and just use a video object for display. Saves me a lot of time as compared to beating the prefabricated components into submission
Find more inspiration, events, and resources on the new Adobe Community
Explore Now