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

Video encapsulation/encoding format issues

Is support hevc (h265)

At present, xgplayer's decoding capability depends on the browser's underlying decoder, so whether it can support hevc depends on whether the user's current browser supports hevc decoding. If the hevc video is played in an environment that does not support hevc decoding, the following two situations will be passed:

  • Direct use of xgplayer (that is, direct native playback without using other decapsulation plug-ins) will cause only sound but no picture
  • Using xgplayer-mp4, xgplayer-hls, xgplayer-flv and other plug-ins, a decoding error will be reported

The above two situations are expected, and they belong to the problem of browser decoding limitation, which cannot be solved.

So how do we judge whether the current browser supports hevc decoding to decide whether to use hevc?

To solve this problem, xgplayer3.x encapsulates two static APIs, isHevcSupported and probeConfigSupported for calling to judge user environment support, specific API call referenceAPI调用参考

Player.probeConfigSupported

Player.isHevcSupported