Skip to main content
Inspiring
June 3, 2013
Answered

How to assign FlvPlayback source to f4v dynamically

  • June 3, 2013
  • 1 reply
  • 2017 views

Odd quirk here...

I'm using the FlvPlayback component to play multiple videos.  Some are flv files, some are f4v files, all residing in the same directory on my Flash Media Server.

If I enter the URL to an f4v file in the "Source" field available in the properties panel when the component is selected on the stage, the f4v file plays fine, as do the flv files.

However, if I try to set the source dynamically via actionscript using:

flvPlayback.source = "rtmp://myFMS/myProject/myVideo.f4v";

No go!  The video doesn't play.  However, using the above code to reference a flv works just fine.

Does an f4v require different verbiage than an flv does?

This topic has been closed for replies.
Correct answer kglad

yes, for fms, the application.xml file can be used to set mime types:

http://help.adobe.com/en_US/flashmediaserver/configadmin/WS5b3ccc516d4fbf351e63e3d119f2926bcf-7ff0.html#WS5b3ccc516d4fbf351e63e3d119f2926bcf-7eea

<MimeType>video/mp4-f4v</MimeType>

1 reply

kglad
Community Expert
Community Expert
June 3, 2013

you need to add f4v files to your servers mime types.  contact your server admin.

mrwizzer2Author
Inspiring
June 3, 2013

Thanks for your prompt reply, kglad.

So until we add the mime types to our Flash Media Server, the video won't load the f4v using the dynamic AS3 code, but it _will_ play the video when the URL is entered into the property panel's "source" field?

That seems odd to me, but if that is indeed the case, I'll have our server admin add the mime types.

Thanks again!

kglad
Community Expert
Community Expert
June 3, 2013

you're welcome.