Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mux-player): Hide cast button by default when using DRM. #930

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

cjpillsbury
Copy link
Contributor

Since DRM-protected content requires a custom receiver app for casting (https://support.google.com/widevine/answer/6072130?hl=en), hide the cast button by default whenever we encounter a drm token. Went ahead and introduced a simple generic concept (props-driven css) and a pattern (internal css vars as defaults) that we can conform to for these cases.

@cjpillsbury cjpillsbury requested a review from a team as a code owner June 5, 2024 15:17
Copy link

vercel bot commented Jun 5, 2024

@cjpillsbury is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

@@ -8,8 +8,16 @@ import { i18n, stylePropsToString } from './utils';
import type { MuxTemplateProps } from './types';
import { StreamTypes, toMuxVideoURL } from '@mux/playback-core';

const getPropsCSS = (props: MuxTemplateProps) => {
const { tokens } = props;
if (!tokens.drm) return '';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obviously if/when we add additional property-specific styles here, we wouldn't want a simple if + early bail. Didn't want to over-architect the guts until we needed it tho.

Copy link
Contributor

@luwes luwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elements-demo-create-react-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 6:52pm
elements-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 6:52pm
elements-demo-svelte-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 6:52pm
elements-demo-vanilla ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 6:52pm
elements-demo-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 6:52pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants