As Spark VideoPlayer is done using osmf,
and as i need to use StreamingURLResource as source because i need urlIncludesFMSApplicationInstance to be true to get EdgeCast streaming work.
i wonder if it is possible to feed VideoPlayer source with StreamingURLResource and how?
Its very sad that no one from Adobe could not answer me because after having found how it works, it was not so hard for one who knows well the SDK.
To help others here is what i found:
If you want to use Flex 4 VideoPlayer (which is based on OSMF) with EdgeCast or any other CDN which add FMS App in URL for RTMP streaming:
until its done properly in the SDK you can do that:
var resourceFullURL:String = "rtmp://fms.yourID.edgecastcdn.net/FMSAPP/mp4:yourvideofile.mp4"; //For EdgeCast FMSAPP is your client ID
var resource:StreamingURLResource = new StreamingURLResource(resourceFullURL);
resource.urlIncludesFMSApplicationInstance = true;
var videoElement:VideoElement = new VideoElement(resource);
flexVideoPlayer.source = videoElement; // also work for VideoDisplay of course
I also lost a lot of time trying to work with flv files so here is what i found:
for the resourceFullURL of previous example:
the base is always: "rtmp://fms.yourID.edgecastcdn.net/FMSAPP/"
but you must add the following according to your video format:
NO EXTENSION FOR FLV FILE! its stupid but it does not work if you add it. Of course your file on the server needs to have the extention!
For HTTP streaming its more easy to use flex 4 VideoPlayer:
flexVideoPlayer.source = "http://wpc.yourID.edgecastcdn.net/FMSAPP/videofileName.videofileFormatExtention";
extention can be mp4, f4v, mov or flv without issues!