/** * * FLVPlaybackUtil.as * * Utility functions for dealing with FLVPlayback components. * * @author matthew at exanimo dot com * @author Ryan Sprake * @version 2007.11.05 * */ package com.exanimo.utils { import fl.video.FLVPlayback; import fl.video.VideoPlayer; import fl.video.flvplayback_internal; use namespace flvplayback_internal; public class FLVPlaybackUtil { /** * * */ public function FLVPlaybackUtil() { throw new Error('FLVPlaybackUtil contains static utility methods and cannot be instantialized.'); } /** * * Set smoothing for an FLVPlayback component. * * @param flvPlayback the component on which to set the property * @param smoothing the smoothing value * */ public static function setSmoothing(flvPlayback:FLVPlayback, smoothing:Boolean):void { for (var i:Number = 0; i < flvPlayback.videoPlayers.length; i++) { var vp:VideoPlayer = flvPlayback.videoPlayers[i]; vp.smoothing = smoothing; } } /** * * Determine whether an FLVPlayback component is being smoothed. * * @param flvPlayback the component you want to check * */ public static function getSmoothing(flvPlayback:FLVPlayback):Boolean { return flvPlayback.videoPlayers[0].smoothing; } /** * * Set deblocking for an FLVPlayback component. * * @param flvPlayback the component on which to set the property * @param deblocking the deblocking value * */ public function setDeblocking(flvPlayback:FLVPlayback, deblocking:int):void { for (var i:Number = 0; i < flvPlayback.videoPlayers.length; i++) { var vp:VideoPlayer = flvPlayback.videoPlayers[i]; vp.deblocking = deblocking; } } /** * * Determine what deblocking method an FLVPlayback component is using. * * @param flvPlayback the component you want to check * */ public function getDeblocking(flvPlayback:FLVPlayback):int { return flvPlayback.videoPlayers[0].deblocking; } } }