Packagevn.karaokeplayer
Interfacepublic interface IKarPlayer
ImplementorsKarPlayer

Interface for KarPlayer



Public Properties
 PropertyDefined by
  audioCompleted : ISignal
[read-only] Dispatches when audio completes playing
IKarPlayer
  beatPlayer : IAudioPlayer
[read-only]
IKarPlayer
  height : Number
[read-only] Height of this player.
IKarPlayer
  length : Number
[read-only] Audio length (in milliseconds)
IKarPlayer
  loadCompleted : ISignal
[read-only] Dispatches when audio (mp3) loading is completed
IKarPlayer
  loadProgress : ISignal
[read-only] Dispatches loading progress
arguments (percent: Number, byteLoaded: uint, byteTotal: uint)
IKarPlayer
  lyricPlayer : ILyricsPlayer
[read-only]
IKarPlayer
  pausing : Boolean
[read-only] Is player pausing
IKarPlayer
  playing : Boolean
[read-only] Is player playing
IKarPlayer
  playProgress : ISignal
[read-only] Dispatches playing progress
arguments (position: Number, length: Number)
IKarPlayer
  position : Number
[read-only] Current position of play head (in milliseconds)
IKarPlayer
  ready : ISignal
[read-only] Dispatches when data and sound are ready
IKarPlayer
  songInfo : SongInfo
[read-only] SongInfo object which is parsed from the lyrics XML
IKarPlayer
  songReady : Boolean
[read-only] Whether song is ready to play
IKarPlayer
  width : Number
[read-only] Width of this player.
IKarPlayer
  x : Number
IKarPlayer
  y : Number
IKarPlayer
Public Methods
 MethodDefined by
  
loadSong(urlOrSongInfo:Object):void
Loads song data from URL or object SongInfo
Note: currently assuming that beat audio is loaded with SongInfo
IKarPlayer
  
pause():void
Pauses the karaoke
IKarPlayer
  
play():void
Plays the karaoke
IKarPlayer
  
seek(pos:Number):void
Seeks to a position (in milliseconds)
IKarPlayer
  
stop():void
Stops the player
IKarPlayer
Property detail
audioCompletedproperty
audioCompleted:ISignal  [read-only]

Dispatches when audio completes playing

Implementation
    public function get audioCompleted():ISignal
beatPlayerproperty 
beatPlayer:IAudioPlayer  [read-only]Implementation
    public function get beatPlayer():IAudioPlayer
heightproperty 
height:Number  [read-only]

Height of this player. This can be used for positioning and layout. This property is overriden so it only measures the logical visible part of the player. It is read-only.

Implementation
    public function get height():Number
lengthproperty 
length:Number  [read-only]

Audio length (in milliseconds)

Implementation
    public function get length():Number
loadCompletedproperty 
loadCompleted:ISignal  [read-only]

Dispatches when audio (mp3) loading is completed

Implementation
    public function get loadCompleted():ISignal
loadProgressproperty 
loadProgress:ISignal  [read-only]

Dispatches loading progress
arguments (percent: Number, byteLoaded: uint, byteTotal: uint)

Implementation
    public function get loadProgress():ISignal
lyricPlayerproperty 
lyricPlayer:ILyricsPlayer  [read-only]Implementation
    public function get lyricPlayer():ILyricsPlayer
pausingproperty 
pausing:Boolean  [read-only]

Is player pausing

Implementation
    public function get pausing():Boolean
playingproperty 
playing:Boolean  [read-only]

Is player playing

Implementation
    public function get playing():Boolean
playProgressproperty 
playProgress:ISignal  [read-only]

Dispatches playing progress
arguments (position: Number, length: Number)

Implementation
    public function get playProgress():ISignal
positionproperty 
position:Number  [read-only]

Current position of play head (in milliseconds)

Implementation
    public function get position():Number
readyproperty 
ready:ISignal  [read-only]

Dispatches when data and sound are ready

Implementation
    public function get ready():ISignal
songInfoproperty 
songInfo:SongInfo  [read-only]

SongInfo object which is parsed from the lyrics XML

Implementation
    public function get songInfo():SongInfo
songReadyproperty 
songReady:Boolean  [read-only]

Whether song is ready to play

Implementation
    public function get songReady():Boolean
widthproperty 
width:Number  [read-only]

Width of this player. This can be used for positioning and layout. This property is overriden so it only measures the logical visible part of the player. It is read-only.

Implementation
    public function get width():Number
xproperty 
x:Number  [read-write]Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]Implementation
    public function get y():Number
    public function set y(value:Number):void
Method detail
loadSong()method
public function loadSong(urlOrSongInfo:Object):void

Loads song data from URL or object SongInfo
Note: currently assuming that beat audio is loaded with SongInfo

Parameters
urlOrSongInfo:Object — url of song lyrics XML or SongInfo
pause()method 
public function pause():void

Pauses the karaoke

play()method 
public function play():void

Plays the karaoke

seek()method 
public function seek(pos:Number):void

Seeks to a position (in milliseconds)

Parameters
pos:Number
stop()method 
public function stop():void

Stops the player