muxinc / media-chrome

Custom elements (web components) for making audio and video player controls that look great in your website or app.
https://media-chrome.org
MIT License
1.21k stars 62 forks source link

HLS.js + React <MediaLiveButton /> is never live (always grey) #748

Closed brandonhub closed 11 months ago

brandonhub commented 11 months ago

Hi MediaChrome team!

I'm building a player with HLS.js + MediaChrome and seem to have found a bug with the react<MediaLiveButton />. It should be red for all live stream, but when using HLS.js, the <media-controller> seems to always be set to mediastreamtype to on-demand even for non-VOD content, which I believe is preventing the live indicator from ever going red.

I have reproduced the problem in a code sandbox: https://codesandbox.io/s/mediachrome-hls-js-live-indicator-zw3rrw

This problem does not happen on Safari since Safari is able to play HLS stream natively and HLS.js is never used.