To enable auto-play, you must add the autoplay and muted attributes to your video tag in your HTML markup:
<video autoplay muted></video>
You can also initiate auto-play from javascript by using the play method on the video element, however the video tag must include the muted attribute:
<video muted></video>
let videoEl = document.querySelector(‘video’);
videoEl.play().then…
*References for additional information:
iOS: https://webkit.org/blog/6784/new-video-policies-for-ios/
Mobile: https://developers.google.com/web/updates/2016/07/autoplay
By default, the Millicast hosted viewer is set to honor autoplay, but this can be easily disabled by setting the query string muted property in the Millicast hosted viewer URL to false:
https://viewer.millicast.com/v1?streamId=[ACCOUNT_ID]/[STREAM_NAME]&muted=[BOOLEAN]
We hope you found this tutorial helpful. Please feel free to comment with any feedback or suggestions. Happy streaming!
-Team Millicast