Closed iamjohnbarker closed 1 year ago
Oh, and muted
too would be wonderful to add.
@iamjohnbarker thanks for opening the issue. It seems to be working here:
https://codesandbox.io/s/hls-element-autoplay-ypsxuc?file=/index.html
<hls-video
controls
autoplay
muted
src="https://stream.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe.m3u8"
></hls-video>
Anything I'm missing? All attributes that <video>
has should work the same for <hls-video>
Getting autoplay to work in browsers has a big caveat, in that browsers will block autoplay in lots of scenarios. (Not to be a corporate shill here, but Mux has some details about that documented here). That's not <hls-video>
or <video>
specific, that's just a reality that browsers make us deal with 😄
Thanks for looking into it @dylanjha - Looks like it's because I used autoPlay instead I am using React and made an assumption.
However even when written properly it is still inconsistent (which understandable is the browser).
I will say though that muted
still doesn't work on my end.
Check out the bottom right module on our app here: https://app.dashmaster2k.com/s/XAA61LCY
Thanks @iamjohnbarker that is... odd actually. I see the muted
attribute on the underlying <video>
element but the player is definitely not muted.
Not sure what's going on exactly, are you able to reproduce this on a codesandbox? That would make for easier debugging.
Just to be sure I tried changing muted="true"
to muted
(and same with autoplay
)
Hmmm 🤔
Loving the work done here!
I can't seem to get
autoplay
to work on my end though. Should this be added alongsidecontrol
?