I am building a video player in Flashbuilder 4 (Flex 4.1) that supports .flv and .mp4 and need to know how to determine if an .mp4 file is playing in flex so I can have other events work off of it.
My player is of type <s:VideoDisplay id ="player"...>
Here's my code:
This code works for the .flv files but for the streaming .mp4's this doesn't work. Does anyone have an idea on how I can get this working for .mp4's also?
Have your net status code handler check for these king of errors:
trace("net status event ", evt.info.code);
if(evt.info.code == "NetStream.Play.FileStructureInvalid")
trace("The MP4's file structure is invalid.");
else if(evt.info.code == "NetStream.Play.NoSupportedTrackFound")
trace("The MP4 doesn't contain any supported tracks");
I will try this and post my results when I'm done.