1 person found this helpful
I was able to successfully play DVR streams of multi bitrates and switching was also happening fine.
Just try the below code as the similar code worked for me. I had used sample OSMF player which came with OSMF so there only I modified and tried to play DVR streams and switch between them.
private function init():void
mps = new MediaPlayerSprite();
var netLoader:DVRCastNetLoader = new DVRCastNetLoader();
var videoElement:VideoElement = new VideoElement(null, netLoader);
var dynResource:DynamicStreamingResource = new DynamicStreamingResource("rtmp://localhost/dvrcast_origin", StreamType.DVR);
var vector : Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem> ( 3 ) ;
vector [ 0 ] = new DynamicStreamingItem ("mp4:livestream1", 1500, 640, 480) ;
vector [ 1 ] = new DynamicStreamingItem ("mp4:livestream1", 1500, 640, 480) ;
vector [ 2 ] = new DynamicStreamingItem ("mp4:livestream3", 500, 640, 480);
dynResource.streamItems = vector ;
var mediaElement:MediaElement = new VideoElement(dynResource);
mps.media = mediaElement;
mps.mediaPlayer.bufferTime = 4;
Hi Wei when you correct this bug?
I think this is very important.