I'm doing a custom osmf player using HDS with adaptive bitrate playing f4m content.
and I've been having some problems with the adaptive bitrate algorithm, it doesn't index a lower bitrate once that it reaches the highgest bitrate.
so I found that you cant configure some rules for the ABR algorithm using a custom NetLoader class... but until now I've found just examples using it over a videoelement.
I'm using the "mediaFactory.createMediaElement" method to obtain the mediaelement for a resource here is the code:
var resource2:URLResource = new URLResource(este);
var element:MediaElement = mediaFactory.createMediaElement( resource2);
var videoelement:VideoElement= new VideoElement(new URLResource(este), new GoWebAB());
var sprite:MediaPlayerSprite= new MediaPlayerSprite();
//sprite.resource=resource2;
sprite.mediaPlayer.media=videoelement;
mediaPlayer=sprite.mediaPlayer;
//sprite.media=videoelement;
addChild(sprite);
You could create a
MediaFactory
instance and add your customMediaFactoryItem
like bellowLook inside
org.osmf.media.DefaultMediaFactory
for more details of how to add a MediaFactoryItem.