dojo.provide("dojox.av.widget.Player");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("dojox.av.widget.Player", [dijit._Widget, dijit._Templated], {
// summary:
// A Media Player UI widget for all types of dojox.av and AIR media.
//
// description:
// Currently for markup only. All controls should reside as child
// nodes within the Player node. 'controlType' is used to determine
// the placement of the control. If no type or an unrecoginized type
// is used, it will be left-aligned in the same row as the volume.
// Note:
// Be sure to use 'controlType' as a node attribute. It is not a
// property of the widget.
//
// example:
// |
// |
// | mediaUrl="video/Grog.flv" autoPlay="true"
// | isDebug="false" dojoType="dojox.av.FLVideo">
// |
// |
// |
// |
// |
//
// playerWidth: /* Number or String */
// Sets the width of the player (not the video size)
// Number will be converted to pixels
// String will be used literally. EX: "320px" or "100%"
playerWidth: "480px",
//
// TODO:
//playerHeight
//videoWidth: 320,
//videoHeight: 240,
widgetsInTemplate:true,
templateString: dojo.cache("dojox.av.widget","resources/Player.html"),
_fillContent: function(){
// summary
// Finding and collecting child nodes
if(!this.items && this.srcNodeRef){
this.items = [];
var nodes = dojo.query("*", this.srcNodeRef);
dojo.forEach(nodes, function(n){
this.items.push(n);
}, this);
}