docs(site): add Google Cast documentation#1681
Merged
Merged
Conversation
- New concept page: site/src/content/docs/concepts/cast.mdx Covers Cast model, lazy SDK loading, session lifecycle, all configuration props (castReceiver, castCustomData, castSrc, castContentType, castStreamType), state selectors, and browser availability pattern. - New reference page: site/src/content/docs/reference/cast-button.mdx Mirrors pip-button.mdx structure — anatomy, behavior, styling, accessibility, and Basic Usage demos for React and HTML. - New demos: site/src/components/docs/demos/cast-button/ React (BasicUsage.tsx + .css) and HTML (BasicUsage.astro + .html + .css + .ts) following the established demo conventions. - Sidebar: adds concepts/cast and reference/cast-button entries. - Cross-link: feature-remote-playback.mdx gets a DocsLinkCard pointing to the new concepts/cast page. Closes videojs#1561 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GoogleCastMixin is being added to HlsMedia and DashMedia in videojs#1661, so Cast is no longer limited to Mux media elements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@Jerricho93 is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
luwes
reviewed
Jun 18, 2026
| <hls-video src="..." castreceiver="YOUR_APP_ID"></hls-video> | ||
| ```ts | ||
| const video = document.querySelector('hls-video'); | ||
| video.config = { googleCast: { receiver: 'YOUR_APP_ID' } }; |
luwes
reviewed
Jun 18, 2026
| src="..." | ||
| castCustomData={{ token: 'abc123', userId: 'u_789' }} | ||
| src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM.m3u8" | ||
| config={{ googleCast: { customData: { token: 'abc123', userId: 'u_789' } } }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1561
Summary
Add docs for Cast feature.
Changes
concepts/cast) explains the sender/receiver model, lazy SDK loading, session lifecycle, and how to configure Cast viacastReceiver,castCustomData,castSrc,castContentType, andcastStreamType.reference/cast-button) documentsCastButton/<media-cast-button>behavior,data-cast-state/data-availabilitystyling hooks, accessibility, and includes live demos for React and HTML.reference/feature-remote-playbacknow cross-links to the concept guide.Open items (pending team answers)
<Video>/<video>element, which doesn't haveGoogleCastMixinapplied. Switching toHlsVideo/<hls-video>is pending team alignment on PR feat(media)!: add Google Cast by default to HLS, DASH media #1661.castOptions: not documented yet — pending clarification on whether it should be surfaced as a read-only accessor or left internal.Testing
localhost:4321under/docs/framework/{react,html}/concepts/cast/and/docs/framework/{react,html}/reference/cast-button/.<ComponentReference>table renders props, state, and data-attrs.[data-availability="unsupported"]hides the Cast button on non-Chromium browsers as documented.Note
Low Risk
Documentation and demo assets only; no runtime library or player behavior changes.
Overview
Adds Google Cast documentation to the docs site: a new Concepts guide, a CastButton component reference with live React/HTML demos, and navigation plus cross-links from Remote Playback.
The
concepts/castpage explains Chromecast support for HLS/DASH: sender/receiver model, session states via remote playback, lazycast_sender.jsloading, minimal setup withCastButton/<media-cast-button>, and configuration throughconfig.googleCast(receiver,customData,src/contentType,streamType, HLS segment detection). It also coversselectRemotePlayback, browser availability, and hiding the control whendata-availability="unsupported".reference/cast-buttondocuments toggle behavior,data-cast-state/data-availabilitystyling, default **aria-label**s, and embeds basic usage demos.docs.config.tsregisters both pages in the sidebar;feature-remote-playbacklinks to the Cast concept guide.Reviewed by Cursor Bugbot for commit 6b984ce. Bugbot is set up for automated code reviews on this repo. Configure here.