I have multiple pieces of media that I wish to display/playback, one after the other, in a prescribed order.
Use the SerialElement in OSMF to group your media together for concurrent display.
//create a new DefaultMediaFactory
mediaFactory = new DefaultMediaFactory();
//use the mediaFactory to create two new MediaElement objects
mediaElement1 = mediaFactory.createMediaElement(new URLResource(MEDIA_URL));
mediaElement2 = mediaFactory.createMediaElement(new URLResource(MEDIA_URL2));
//create a new SerialElement
serialElement = new SerialElement ( ) ;
//create a new MediaPlayer instance
mediaPlayer = new MediaPlayer();
//set the mediaPlayer not to begin playback by default
mediaPlayer.autoPlay = false;
//set the media property of the mediaPlayer to the serialElement
mediaPlayer.media = serialElement;
//create a new MediaContainer
mediaContainer = new MediaContainer();
//add both MediaElement instances to the serialElement
serialElement.addChild ( mediaElement1 ) ;
serialElement.addChild ( mediaElement2 ) ;
//add the serialElement to the MediaContainer
mediaContainer.addMediaElement(serialElement);
//add the mediaContainer to the display list
addChild(mediaContainer);
+