roguish

OSMF Media Player with REOPS Extension

Tip 1: playing an FLV from your local machine.
To play a local video you must modify your config XML file to include a baseURL. Otherwise, the video fails to load.

In PlayerConfig.as, the parseConfigXML method sets the configXML property for the class. Once that happens, the mediaElement getter method parses the configXML file, and the mediaElement is available to the code. In Debug mode, if you inspect the mediaElement > resource > [inherited] > url property you’ll see that your specified url has had a string prepended. In my case, when my config XML specified a URL “sample.flv”, the parsed and prepended value became “:///data/revelensSample.flv” unless I specified a baseURL.

Example mediaElement XML excerpt:

1
2
3
4
5
6
7
8
9
10
<mediaElement>
	<mediaElement>
		<id>myPlayer</id>
		<mimeType>video/x-flv</mimeType>
		<streamType>recorded</streamType>
		<deliveryType>progressive</deliveryType>
		<baseURL>./</baseURL>
		<media url="sample.flv" width="800" height="600" />
	</mediaElement>	
</mediaElement>

See REOPS’ comment for the baseURL property in the Manifest.as file:
The baseURL element contains the base URL for all relative (HTTP-based) URLs in the manifest. It is optional. When specified, its value is prepended to all relative URLs (i.e. those URLs that don’t begin with “http://” or “https://” within the manifest file. (Such URLs may include media URLs, bootstrapInfo URLs, and drmMetadata URLs.)

Reference:
https://code.google.com/p/reops/

Leave a Reply