Real-Time Views
Real-time viewers can be displayed when using Mux Data. This works with both assets and live streams. The {realtime_url}
tag builds the signed link to request the current views from the Mux API directly.
Web Component
<!-- Include Once, use path to your themes folder. -->
<script type="module" src="/themes/user/mux/components/realtime-views.js"></script>
<!-- Include as many times as needed within a video loop -->
<mux-realtime-views
token="{realtime_token}" // Required
views // Optional.
viewers // Optional.
>
</mux-realtime-views>
Build Your Own
Simply request the url to get the current real-time views. For more information, visit the Mux Real-Time guide (steps 1-3 are handled by the MuxEE add-on)