I just tried using the VideoElement to load a local test.flv which resides in the same folder as the SWF.
if I use
new URLResource( "test.flv" );
LoaderBase throws MediaFrameworkStrings.ILOADER_CANT_HANDLER_RESOURCE
(note: typo in the constant name)
If I use
new URLResource( "file:///pathToMyFlexProject/bin-debug/test.flv" );
It works fine.
So, should relative paths be accepted ?
Looking at NetLoader suggests to me that PROTOCOL_EMPTY is designed to catch and manage such a resource? Unfortunately, the call to validateLoad throws the exception before it is reached.
This is my first day of OSMF so I'm not sure if I am doing something stupid or simply hit a bug.
Error: ILoader unable to handle the given IMediaResource
at org.openvideoplayer.loaders::LoaderBase/validateLoad()[/Volumes/binky/projects/0000-3rdPa rtyAS3/osmf/osmf_source_s3/framework/MediaFramework/org/openvideoplayer/loaders/LoaderBase .as:99]
at org.openvideoplayer.net::NetLoader/load()[/Volumes/binky/projects/0000-3rdPartyAS3/osmf/o smf_source_s3/framework/MediaFramework/org/openvideoplayer/net/NetLoader.as:99]
at org.openvideoplayer.traits::LoadableTrait/load()[/Volumes/binky/projects/0000-3rdPartyAS3 /osmf/osmf_source_s3/framework/MediaFramework/org/openvideoplayer/traits/LoadableTrait.as: 147]
at org.openvideoplayer.media::MediaPlayer/updateTraitListeners()[/Volumes/binky/projects/000 0-3rdPartyAS3/osmf/osmf_source_s3/framework/MediaFramework/org/openvideoplayer/media/Media Player.as:834]
at org.openvideoplayer.media::MediaPlayer/set source()[/Volumes/binky/projects/0000-3rdPartyAS3/osmf/osmf_source_s3/framework/MediaFram ework/org/openvideoplayer/media/MediaPlayer.as:284]
This is definitely a bug: the canHandleResource method should be consistent with the load method, in terms of the inputs that each accepts. If the protocol is empty, then it seems like canHandleResource should accept any file whose file extension matches the supported media, and not just MP3.
Can you file a bug here?