2011年11月20日星期日

[Web evolution] WMP-page prevalent properties and methods

[Web evolution] WMP-page mutual properties and means
wmp.uiMode: String; / / athlete interface model because Full, Mini,UGG Sale, None,Moncler UK, Invisible
wmp.playState: int; / / playback status, 1 = Stop, 2 = pause, 3 = Play, 6 = are buffered, 9 = Connecting, 10 = ready
wmp.enableContextMenu: Boolean; / / Enable / Disable right-click menu
wmp.fullScreen: boolean; / / fullscreen exhibit
/ / player common control
wmp.controls.melodrama; / / Play
wmp.controls.pause; / / pause
wmp.controls.stop; / / Stop
wmp.controls.currentPosition: double; / / current progress
wmp.controls.currentPositionString: string; / / present progress, the string format. Such as . controls.before; / / aboard a
/ / player used to set
wmp.settings.volume: integer; / / Volume ,0-100
wmp.settings.autoStart: Boolean; / / whether to automatically play
wmp.settings.mute: Boolean; / / if speechless
wmp.settings.playCount: integer; / / Views
wmp.settings.balance = -100; / / (left sound)
wmp.settings.balance = 100; / / (Right audio)
wmp.settings.balance = 0; / / (all sound)
/ / common properties of the current media
wmp. currentMedia.duration: double; / / media total length
wmp.currentMedia.durationString: string; / / medium aggregate length of the string format. Such as Artist / / ); / / set the media message along attribute name
wmp.currentMedia.name: string; / / with currentMedia.getItemInfo (. network.downloadProgress; / / download percent

extra comprehensive page parameter settings


related references and explanations watch on!



how to play a music catalogue?
idea: play a music list, you need to attain two intentions, first cycle, the second is to decide whether the current melody has ended playing and merely the current song play only after completion of cycle. to achieve detection.

var i = 0;
playthis (firstmusic)
/ / real-time revelation, the interval period of 1 second
d = setInterval (function shwotimer ()
{
if (WMP.playState == 1)
{
if (i> = SoundArray.length)
{ ;
/ / When achieved playing all the vacant cycle
clearInterval (d);
;}
; else
{
; / / while the next player after playing the 1st
playthis (url);
}
}
}
, 1000);

anyone other control needs, such as standstill, you can set an identity, namely is currently suspended, the afterward step apt play, and vice versa
var pauseflag = 0;
function Command_Pause ()
; {
whether (pauseflag == 0)

; WMP.controls.Pause ();

else

WMP.controls.play ( );

pauseflag = pauseflag == 1? 0:1;
}

没有评论:

发表评论