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

静态API

提示

本节API代码均默认基于如下环境

import Player from 'xgplayer'

Player[API](xxx)

probeConfigSupported

详细说明详见Sniffer>probeConfigSupported

调用

import Player from 'xgplayer'
const result = null

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

isHevcSupported

详细说明详见Sniffer>isHevcSupported

调用

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