OSMF Smoothing Video on MediaElement – MediaFactory

At first I couldn’t think of how to apply smoothing to OSMF’s MediaElement when using the MediaFactory. One day later it hit me and I wanted to share. First thing you need to do is the check if the MediaElement is a VideoElement. Once we know it is a VideoElement we can let the compiler know it is a VideoElement and apply smoothing to the video.

var mediaFactory:MediaFactory =  new DefaultMediaFactory();
mediaElement = mediaFactory.createMediaElement(new StreamingURLResource(httpStreaming));
			
if(mediaElement is VideoElement)
{
(mediaElement as VideoElement).smoothing = true;
}

One Response to “OSMF Smoothing Video on MediaElement – MediaFactory”

  1. gaglage Says:
    July 1, 2014 at 3:10 am

    Does it really work? Not for me :(

Leave a Reply