Mux Player
Mux Player example. See the full docs at https://docs.mux.com/guides/video/mux-player
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mux Player</title>
<!-- For Mux Data load times. -->
<script>window.muxPlayerInitTime = Date.now();</script>
<script defer src="https://cdn.jsdelivr.net/npm/@mux/mux-player"></script>
</head>
<body>
{exp:channel:entries channel="blog"}
<!-- Asset -->
{mux_asset_field}
<mux-player
playback-id="{playback_id}"
{if signed == true}
playback-token="{playback_token}"
{if audio_only == false}
thumbnail-token="{jpg_token}"
storyboard-token="{storyboard_token}"
{/if}
{/if}
{if env_key !=''}
env-key="{env_key}"
{/if}
stream-type="{if type=='asset'}on-demand{if:else}live{/if}"
metadata-video-title="{mux_title}"
metadata-viewer-user-id="{logged_in_member_id}"
metadata-video-id="{mux_id}"
></mux-player>
{/mux_asset_field}
<!-- Live -->
{mux_live_id_field}
<mux-player
playback-id="{playback_id}"
{if signed == true}
playback-token="{playback_token}"
{/if}
{if env_key !=''}
env-key="{env_key}"
{/if}
stream-type="live"
metadata-video-title="{mux_title}"
metadata-viewer-user-id="{logged_in_member_id}"
metadata-video-id="{mux_id}"
></mux-player>
{/mux_live_id_field}
{/exp:channel:entries}
</body>
</html>