西瓜播放器 HTML5 video video.js 播放器 HTML5播放器 mp4 hls hls.js flv flv.js dash dash.js 无缝切换

Properties

config

  • @desc Configuration passed by user
  • @type Object [readonly]

see Configuration for more details

root

  • @desc DOM node that player mount on
  • @type HTMLElement [readonly]

video

  • @desc Player media element
  • @type Object [readonly]

autoplay

  • @desc Auto play
  • @type Boolean [readable & writable]

buffered

  • @desc HTMLMediaElement.buffered, returns a TimeRanges object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered property is accessed.
  • @type TimeRange [readonly]

played

  • @desc HTMLMediaElement.played, returns a TimeRanges object that contains the ranges of the media source that the browser has played, if any.
  • @type TimeRange [readonly]

crossOrigin

  • @desc HTMLMediaElement.crossOrigin, a DOMString indicating the CORS setting for this media element.
  • @type String [readable & writable]

currentSrc

  • @desc HTMLMediaElement.currentSrc, returns a DOMString with the absolute URL of the chosen media resource.
  • @type String [readable & writable]

currentTime

  • @desc HTMLMediaElement.currentTime, a double-precision floating-point value indicating the current playback time in seconds; if the media has not started to play and has not been seeked, this value is the media's initial playback time. Setting this value seeks the media to the new time. The time is specified relative to the media's timeline.
  • @type Number [readable & writable]

duration

  • @desc HTMLMediaElement.duration, a read-only double-precision floating-point value indicating the total duration of the media in seconds
  • @type Number [readonly]

cumulateTime

  • @desc The cumulate time player has played in millisecond
  • @type Number [readonly]

volume

  • @desc HTMLMediaElement.volume, indicates the audio volume, from 0.0 (silent) to 1.0 (loudest).
  • @type Number [readable & writable]

muted

  • @desc HTMLMediaElement.muted, determines whether audio is muted. true if the audio is muted and false otherwise.
  • @type Boolean [readable & writable]

defaultMuted

  • @desc HTMLMediaElement.defaultMuted, reflects the muted HTML attribute, which indicates whether the media element's audio output should be muted by default.
  • @type Boolean [readonly]

playbackRate

  • @desc HTMLMediaElement.playbackRate, a double that indicates the rate at which the media is being played back
  • @type Number [readonly]

error

  • @desc HTMLMediaElement.error, returns a MediaError object for the most recent error, or null if there has not been an error.
  • @type String [readonly]

errorNote

  • @desc Media error code constants, returns a MediaError code constants for the most recent error, or '' if there has not been an error.
  • @type String [readonly]

loop

  • @desc HTMLMediaElement.loop, reflects the loop HTML attribute, which indicates whether the media element should start over when it reaches the end.
  • @type Boolean [readable & writable]

src

  • @desc HTMLMediaElement.src, a DOMString that reflects the src HTML attribute, which contains the URL of a media resource to use. Set this attributes and player would start to load a new media resource you assigned.
  • @type String [readable & writable]

lang

  • @desc Set or get current language player is now using
  • @type string [readable & writable]

version

  • @desc Get player built version
  • @type string [readable & writable]

controls

  • @desc Set or get
  • @type Plugin [readable & writable]

Get control bar element,for more details seecontrols

innerContainer

  • @desc builtin DOM container, only accessible when config.marginControls is setted to true
  • @type HTMLElement [readonly]