Skip to main content
sivanesanm44251804
Participant
December 13, 2017
Question

Flash HLS: How to initialize the player directly with the HLS manifest data?

  • December 13, 2017
  • 0 replies
  • 494 views

Hi,

Is it possible to directly send the HLS manifest data to the Flash player? I am trying to make use of data uri feature as below.

In my media.html, I have the below code.

var dataUri = "data:,#EXTM3U\r\n"+

"#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1064960\r\n"+

"http://host1:80/path1/master_stream1.m3u8\r\n"+

"#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1064960\r\n"+

"http://host2:80/path1/master_stream1.m3u8";

var parameters = {

src: dataUri`,

                autoPlay: "true",

                verbose: true,

                controlBarAutoHide: "true",

                controlBarPosition: "bottom",

                poster: "images/poster.png",

                javascriptCallbackFunction: "jsbridge",

                plugin_hls: "../../bin/debug/flashlsOSMF.swf",

                hls_minbufferlength: -1,

                hls_maxbufferlength: 30,

                hls_lowbufferlength: 3,

                hls_seekmode: "KEYFRAME",

                hls_startfromlevel: -1,

                hls_seekfromlevel: -1,

                hls_live_flushurlcache: false,

                hls_info: true,

                hls_debug: false,

                hls_debug2: false,

                hls_warn: true,

                hls_error: true,

                hls_fragmentloadmaxretry : -1,

                hls_manifestloadmaxretry : -1,

                hls_capleveltostage : false,

               hls_maxlevelcappingmode : "downscale"

            };

When I tried the above, it throws the following exception.

Error: LoaderBase unable to handle the given MediaResourceBase

at org.osmf.traits::LoaderBase/validateLoad()

at org.osmf.traits::LoaderBase/load()

at org.osmf.traits::LoadTrait/load()

at org.mangui.osmf.plugins.loader::HLSLoadFromDocumentElement/onLoadStateChange()[XXXXXXXXXX\newFlash\src\org\mangui\osmf\plugins\loader\HLSLoadFromDocumentElement.as:118]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at org.osmf.elements.proxyClasses::LoadFromDocumentLoadTrait/loadStateChangeEnd()

at org.osmf.traits::LoadTrait/setLoadState()

at org.osmf.traits::LoadTrait/onLoadStateChange()

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at org.osmf.traits::LoaderBase/updateLoadTrait()

at org.mangui.osmf.plugins.loader::HLSLoaderBase/_manifestHandler()[XXXXXXXXXX\newFlash\src\org\mangui\osmf\plugins\loader\HLSLoaderBase.as:126]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at org.mangui.hls::HLS/dispatchEvent()[XXXXXXXXXX\newFlash\src\org\mangui\hls\HLS.as:57]

at org.mangui.hls.loader::ManifestLoader/_parseLevelPlaylist()[XXXXXXXXXX\newFlash\src\org\mangui\hls\loader\ManifestLoader.as:176]

at org.mangui.hls.playlist::Manifest/onLoadedData()[XXXXXXXXXX\newFlash\src\org\mangui\hls\playlist\Manifest.as:111]

at org.mangui.hls.playlist::Manifest/_loaderHandler()[XXXXXXXXXX\newFlash\src\org\mangui\hls\playlist\Manifest.as:107]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/onComplete()

I really appreciate your help in resolving the above issue?

Or are there any work around to initialize the player with my own custom HLS manifest data?

Thanks,

smsivanesan

This topic has been closed for replies.