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

mobile

Player mobile interactive plug-in。SourceCode

pluginName: mobile

Switch the focus state of the player area, slide left and right to fast forward/rewind, drag to display time preview, etc.

Note

The plug-in is only registered on the mobile side

Function description:

    1. Click the player area to hide/call out the control bar
    1. Double click the player area to switch the pause/play state
    1. All slide the player area, fast forward/rewind, and display a mini time progress bar and preview image in the middle
    1. Long press the player area to play at 2x speed (在支持倍速调节的情况下)
    1. Slide up and down on the left to adjust the volume (if volume adjustment is supported)

config

disableGesture

  • @type: Boolean, default: false
  • @desc: Whether to disable gestures

gestureX

  • @type: Boolean, default: true
  • @desc: Whether to enable horizontal gesture processing

gestureY

  • @type: Boolean, default: true
  • @desc: Whether to enable vertical gesture processing

scopeL

  • @type: Number, default: 0.25
  • @desc: Gesture range on the left, Ranges 0-1

scopeR

  • @type: Number, default: 0.25
  • @desc: Gesture range on the right, Ranges 0-1

pressRate

  • @type: Number, default: 2
  • @desc: Long press to fast forward and double speed

darkness

  • @type: Boolean, default: *true`
  • @desc: Whether to enable the dimming function on the right

maxDarkness

  • @type: Number, default: 0.6
  • @desc: Dimming the maximum darkness

updateGesture

  • @type: function
  • @desc: Gesture trigger callback

gradient

  • @type: String, default: normal
  • @desc: Whether to enable upper and lower gradient shadows,value normal | none | top | bottom

isTouchingSeek

  • @type: Boolean, default: true
  • @desc: Whether to update the currentTime of the player at the same time as touchMove, the default is false. During the gesture movement, the fast forward and rewind of the player will not be called directly, and then set when toucheEnd

miniMoveStep

  • @type: Number, Whether to enable upper and lower gradient shadows: 5
  • @desc: touchemove triggers the pace, the default value is 5, used for throttling

disableActive

  • @type: Boolean, default: false
  • @desc: Whether to disable the time progress bar

disableTimeProgress

  • @type: Boolean, default: false
  • @desc: Whether to disable the time progress bar

hideControlsActive

  • @type: Boolean, default: true
  • @desc: Whether to hide the control bar when dragging by gesture

hideControlsEnd

  • @type: Boolean, default: false
  • @desc: Hide the control bar when the gesture ends

moveDuration

  • @type: Number, 单位ms default: 60 * 6 * 1000
  • @desc: When sliding the player area to fast forward/rewind, the duration corresponding to the player area

disablePress

  • @type: Boolean, default: true
  • @desc: Disable long press double speed adjustment

disableSeekIcon

  • @type: Boolean, default: false
  • @desc: Whether to disable button prompts when fast forward/rewind

API

disableGesture()

  • @desc: Disable gestures

enableGesture()

  • @desc: Enable gestures