Streaming

How to Enable Auto-Play of Your Millicast Streams On Any Browser

SUMMARY

Enabling auto-play allows your viewers to see your millicast stream automatically without having to do any more work


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

Leave a Comment

Get Started

Drive real-time interactions and engagement with sub-second latency

We are more than just a streaming solutions provider; we are a technology partner helping you build a streaming ecosystem that meets your goals. Get started for free and as you grow, we offer aggressive volume discounts protecting your margins.

Developer Resources

Explore learning paths and helpful resources as you begin development with Dolby.io.

Copy link
Powered by Social Snap