2 Replies Latest reply on Jul 28, 2009 12:15 PM by ThomasDD

    VideoElement > video > properties

    ThomasDD

      Hallo

      Nice Framework.

      I test the VideoElement Class and it looks that i dont have access to the Video. I want to have different values from my Controls for video.smoothing and video.deblocking. But there is no access for this values. It looks like the video is catching in the processLoadedState function.

      Is it true?

       

      Thanks Thomas

        • 1. Re: VideoElement > video > properties
          bringrags Level 4

          The reason it's not exposed on VideoElement is that we want to have a consistent API for all MediaElement subclasses, and represent their different implementations through different trait implementations (as opposed to exposing video-specific APIs).  If you want to access the underlying Video, you can take advantage of the fact that the Video is the DisplayObject that forms the IViewable trait for the VideoElement:

           

           

          var viewable:IViewable = videoElement.getTrait(MediaTraitType.VIEWABLE) as IViewable;

          var videoObject:Video = viewable.view as Video;

          videoObject.smoothing = ...;

           

          Note that IViewable will be null until the video is loaded (which you can detect by listening for the LoadableStateChangeEvent on the VideoElement's ILoadable trait) since we don't have a DisplayObject until the video is ready to play.

           

          Hope this helps!

          • 2. Re: VideoElement > video > properties
            ThomasDD Level 1

            Thanks, i will try it this week.