Recently I want to be an online music player myself, but there are still a few questions... the most important thing is to have a good headache...
We also need to call the WMP component... the following lists the relevant methods of the WMP component as an unexpected need for future viewing!
Property/Method Name: Note:[Basic attributes] URL: String; specifies the media location. The local or network address is uiMode: String. The Player UI mode can be Full, Mini, None, Invisible playState: integer. The playback status, 1 = stop, 2 = pause, 3 = play, 6 = buffering, 9 = connection, 10 = Ready enableContextMenu: Boolean; enable/disable right-click menu fullScreen: boolean; whether to display [controls] wmp in full screen. controls // The basic controller of the player. play; play controls. pause; pause controls. stop; stop controls. currentPosition: double; current progress: controls. currentPositionString: string; current progress, string format. For example, "00:23" controls. fastForward; fast forward to controls. fastReverse; return quickly to controls. next; the next piece of controls. previous; previous [settings] wmp. settings // apsaravideo player Basic settings. volume: integer; volume, 0-100 settings. autoStart: Boolean; Whether to play settings automatically. mute: Boolean; Whether to mute settings. playCount: integer; playback Times [currentMedia] wmp. currentMedia // current media attribute currentMedia. duration: double; total media length currentMedia. durationString: string; total media length, in the string format. For example, "" currentMedia. getItemInfo (const string); get current media information "Title" = media Title, "Author" = artist, "Copyright" = Copyright information, "Description" = media content Description, "Duration" = Duration (seconds), "FileSize" = file size, "FileType" = file type, "sourceURL" = original address currentMedia. setItemInfo (const string); sets the media information currentMedia using the attribute name. name: string; same as currentMedia. getItemInfo ("Title") [currentPlaylist] wmp. currentPlaylist // current playlist attribute currentPlaylist. count: integer; number of media in the current playlist currentPlaylist. item [integer]; obtains or sets the media information of the specified project. Its subattributes are the same as those of wmp. currentMedia