The HTTP access plugin lets you modify remote mp4 HTTP requests for mp4 files that are fetched from a remote HTTP server. You can use the plugin to add or remove headers and rewrite urls. Primetime Origin Server 1.2, or higher, provides the following default implementations of the HTTP access plugin:
To use a plugin, specify its name and the corresponding configuration in the vod. xml file under the Config/ MP4 element.
You should also specify the fully-qualified class name of the plugin in the Config/ MP4/ HttpAccessPlugin/ Class element. You can specify additional configuration for the plugin under Config/ MP4/ HttpAccessPlugin/ Init.
The following is a sample configuration for the SimpleHttpAccess plugin:
<MP4> <!-- The duration of the output fragments in milliseconds. --> <FragmentDuration>4000</FragmentDuration> <!-- The TargetDuration should be greater than the maximum fragment duration in milliseconds. --> <TargetDuration>6000</TargetDuration> <HttpAccessPlugin> <Class>com.adobe.fms.util.httpfileaccess.SimpleHttpAccess</Class> <BaseURL>http://server_host:port/root_path</BaseURL> <Init> <BaseURL>http://server_host:port/root_path</BaseURL> </Init> </HttpAccessPlugin> </MP4>
Custom implementations for the http access plugin are sandboxed at the Stream Container Level. You should copy them to the lib folder inside the configuration folder of the Stream Container.
Consider a scenario where a plugin that provides access to CQ CMS is created with the implementation class name com.my.httpaccess.CQAccess and packaged in the jar file CQPlugin.jar. If you use this plugin for your stream container default, the directory structure and configuration will look like this:
/conf /http /origin.xml <- Global configuration /containers /_default_ /container.xml <- Per container configuration /lib /CQPlugin.jar <- CQ Access Plugin /streams <- Modules for this tenant /channel1 /vod.xml <- Per stream configuration ...
In this case, vod.xml will have the following sample configuration:
<Config> .... <!-- Config for MP4 JIT Packaging --> <MP4> ..... <HttpAccessPlugin> <Class>com.my.httpaccess.CQAccess</Class> <Init> <!-- Config for CQAccess plugin --> </Init> </HttpAccessPlugin> </Config>