JavaScript control Web Player includes MediaPlayer and RealPlayer

Source: Internet
Author: User

Media Player Control

Player.controls.play (); Play
Player.controls.stop (); Stop it
Player.controls.pause (); Time out
Player.controls.currentPosition returns the current time position (in seconds) of the playback file
Player.controls.currentPositionString time-formatted string "0:32"
Player.currentMedia.duration returns the total length of the playback file (in seconds)
Player.currentMedia.durationString time-formatted string "4:34"
Player.settings.volume Volume (0-100)
Player.settings.balance Channel, it should be able to carry out stereo, left channel, right channel control. But the corresponding value is not clear.
Player.settings.mute = S Mute (s evaluates to True and false)
ID of the container in which the caption appears in the Player.closedCaption.CaptioningID Web page
Player.closedCaption.SAMIFileName Title file Address
Player.playstate return to Player status (3: Playing, 2: Pause 1: Stopped)


--------------------------------------------------------------------------------------------------------------

Real Player Control


Player. Doplay () plays the
player. Dopause () pauses
player. Dostop () stops
player. GetLength () returns the total length (in milliseconds) of the playback file
Player. GetPosition () returns the current time position (in milliseconds) for the playback file
Player. Getplaystate () returns the player status (0: Stop, 1: Connection, 2: Buffer, 3: Play, 4: Pause, 5: Find)
player. where the SetPosition (n) time position jumps to N (n takes a value in milliseconds)
player. SetVolume (n) sets the volume (n values to 0)
Player. Setmute (s) Mute (s evaluates to True and false)
Player. Setfullscreen () Full screen
Player.setsource () set file source  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.