-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
@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 ''; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.