Packagevn.karaokeplayer
Classpublic class KarPlayer
InheritanceKarPlayer Inheritance flash.display.Sprite
ImplementsIKarPlayer



Public Properties
 PropertyDefined by
  audioCompleted : ISignal
[read-only] Dispatches when audio completes playing
KarPlayer
  beatPlayer : IAudioPlayer
[read-only]
KarPlayer
  height : Number
Height of this player.
KarPlayer
  length : Number
[read-only] Audio length (in milliseconds)
KarPlayer
  loadCompleted : ISignal
[read-only] Dispatches when audio (mp3) loading is completed
KarPlayer
  loadProgress : ISignal
[read-only] Dispatches loading progress
arguments (percent: Number, byteLoaded: uint, byteTotal: uint)
KarPlayer
  lyricPlayer : ILyricsPlayer
[read-only]
KarPlayer
  pausing : Boolean
[read-only] Is player pausing
KarPlayer
  playing : Boolean
[read-only] Is player playing
KarPlayer
  playProgress : ISignal
[read-only] Dispatches playing progress
arguments (position: Number, length: Number)
KarPlayer
  position : Number
[read-only] Current position of play head (in milliseconds)
KarPlayer
  ready : ISignal
[read-only] Dispatches when data and sound are ready
KarPlayer
  songInfo : SongInfo
[read-only] SongInfo object which is parsed from the lyrics XML
KarPlayer
  songReady : Boolean
[read-only] Whether song is ready to play
KarPlayer
  width : Number
Width of this player.
KarPlayer
Public Methods
 MethodDefined by
  
KarPlayer(options:KarPlayerOptions = null)
KarPlayer
  
loadSong(urlOrSongInfo:Object):void
Loads song data from URL or object SongInfo
Note: currently assuming that beat audio is loaded with SongInfo
KarPlayer
  
pause():void
Pauses the karaoke
KarPlayer
  
play():void
Plays the karaoke
KarPlayer
  
seek(pos:Number):void
Seeks to a position (in milliseconds)
KarPlayer
  
stop():void
Stops the player
KarPlayer
Public Constants
 ConstantDefined by
  VERSION : String = "0.8.71"
[static]
KarPlayer
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-write]

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
    public function set height(value:Number):void
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-write]

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
    public function set width(value:Number):void
Constructor detail
KarPlayer()constructor
public function KarPlayer(options:KarPlayerOptions = null)Parameters
options:KarPlayerOptions (default = null)
Method detail
debug()method
karplayer_internal function debug():void
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

prepareDebug()method 
karplayer_internal function prepareDebug():void
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

Constant detail
VERSIONconstant
public static const VERSION:String = "0.8.71"