VideoDisplay

Kind of class: public class
Package:
Inherits from:
Version: 8 Mar 2010
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.display.VideoDisplay
File last modified: Friday, 18 February 2011, 15:04:20
Loads and displays video via NetStream (flv and h264)
Example

  • Basic usage:
    import com.johnpolacek.display.VideoDisplay;
    var video:VideoDisplay = new VideoDisplay();
    video.loadVideo("example.flv");
    
    Example with styling:
    import com.johnpolacek.display.VideoDisplay;
    var video:VideoDisplay = new VideoDisplay();
    video.autoPlay = false;
    video.autoRewind = true;
    video.buttonColor = 0xFFCC99;
    video.backgroundColor = 0x333355;
    video.loadVideo("example.flv");
    video.addPoster("poster.jpg");
    addChild(video);
    
See also

Summary

Constructor
Instance properties
Instance methods
Instance methods inherited from ContentDisplay

Constructor

VideoDisplay

function VideoDisplay()
Parameters
videoURL:url of the video.

Instance properties

autoPlay

autoPlay:Boolean = true(read,write)

Default is true.

autoRewind

autoRewind:Boolean = false(read,write)

Default is false.

backgroundColor

backgroundColor:uint = 0x000000(read,write)

Color of player background. Default is 0x000000

buttonColor

buttonColor:uint = 0xFFFFFF(read,write)

Color of player buttons. Default is 0xFFFFFF

player

player:VideoStreamPlayer(read,write)

The video player

showControls

showControls:Boolean = true(read,write)

Boolean for video controls visibility. Default is true.

Instance methods

addPoster

function addPoster(posterURL:String) : void
Parameters
posterURL:url of the poster.

destroy

override function destroy() : void

Remove event listeners and clear children

loadVideo

function loadVideo(videoURL:String)
Parameters
videoURL:url of the video.

onLoadComplete

override function onLoadComplete(event:Event) : void

Dispatches Event.COMPLETE