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

Static API

notice

The API codes in this section are based on the following environment by default

import Player from 'xgplayer'

Player[API](xxx)

probeConfigSupported

For details, seeSniffer>probeConfigSupported

demo

import Player from 'xgplayer'
const result = null

Player.probeConfigSupported(mediaConfig).then((decodingInfo) => {
  console.log(decodingInfo)
}).then(data => {
  result = data
})

isHevcSupported

For details, seeSniffer>isHevcSupported

demo

import Player from 'xgplayer'
const result = Player.isHevcSupported()