Youtube AS3 Wrapper v0.8.0m
This new version introduces support for multiple videos playback in the same time, on the same stage!
Some changes in the api: All the methods have been added a new parameter, “playerid”, which will represent the id of the player to which the function will apply.
Example:
function loadVideo
(id
: String, startSeconds
: Number =
0, playerid
: uint =
0) : void;
The default for this parameter is 0, meaning that by default the function applies to the player with id=0. Which is the first player that is created.
If you use only one player (you don’t create more), you can forget about this parameter.
New methods added:
/**
* Creates a new player
* @return int the new player's id
*/
function createPlayer
() : int;
/**
* Sets the alpha [0,1] for the specified player
*/
function setAlpha
(alpha : Number, playerid
: uint =
0) : void;
/**
* Sets the visibility for the specified player
*/
function setVisible
(visible : Boolean, playerid
: uint =
0) : void;
/**
* Sets the position for the specified player
*/
function setPosition
(x : Number, y : Number, playerid
: uint =
0) : void;
/**
* Swaps the depths of the 2 specified players
*/
function swapDepths
(playeridToBeSwapped
: uint, playeridToSwapWith
: uint) : void;
/**
* Brings the specified player to front
*/
function bringToFront
(playerid
: uint) : void;
/**
* Sends the specified player to back
*/
function sendToBack
(playerid
: uint) : void;
/**
* Sends the specified the specified player to it's original depth
* Note that when usign swapDepths the player that is swapped has it's original depth set to the new depth
*/
function sendToOriginalDepth
(playerid
: uint) : void;
The createPlayer method creates New player.
Always wait for the previous player the be ready before calling this method!
The method return the new player’s id. The first time the method is called, it will return 1. Because the player with id=0 is created without calling this method.
After calling this method, the PLAYER_READY event will be dispatched when the new player is ready, and event object will have the playerid parameter set to the new player’s id.
The other new methods speak for themselves through their names.
The YoutubeEvent has now a new parameter:
public var playerid
: uint;
This parameter says now which player dispatched the event.
Youtube AS3 Wrapper v0.7.2
This new version fixes a bug where adding and removing the player to and from stage repeatedly causes it to crash.
Youtube AS3 Wrapper v0.7.1
Adds Adobe AIR support. The api remains unchanged.
Youtube AS3 Wrapper v0.7
Fixes the volume bug in IE and deprecates the reload():void and destroyAndReload():void methods because the volume works without reloading the player.
Youtube AS3 Wrapper v0.6
The first released version of the Youtube AS3 Wrapper.
Has problems with volume in Internet Explorer. In order to bypass this problem, the ytPlayer needs to be reloaded for every new clip that plays, using reload():void or destroyAndReload():void methods.
Youtube, Youtube Wrapper
actionscript, as3, changelog, wrapper, Youtube