mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 05:37:21 +00:00
fix(skin): temporarily hide the caption button (#629)
This commit is contained in:
@@ -290,14 +290,6 @@ export function VideoSkinTailwind(props: VideoSkinProps): ReactNode {
|
||||
<Time.Value type="duration" className="text-shadow-2xs text-shadow-black/25 tabular-nums" />
|
||||
</Time.Group>
|
||||
|
||||
<CaptionsButton
|
||||
render={(props, state) => (
|
||||
<Button variant="icon" {...props}>
|
||||
<CaptionsButtonIcon state={state} className={icon} />
|
||||
</Button>
|
||||
)}
|
||||
/>
|
||||
|
||||
<MuteButton
|
||||
render={(props, state) => (
|
||||
<Button variant="icon" {...props}>
|
||||
@@ -306,6 +298,14 @@ export function VideoSkinTailwind(props: VideoSkinProps): ReactNode {
|
||||
)}
|
||||
/>
|
||||
|
||||
<CaptionsButton
|
||||
render={(props, state) => (
|
||||
<Button variant="icon" {...props}>
|
||||
<CaptionsButtonIcon state={state} className={icon} />
|
||||
</Button>
|
||||
)}
|
||||
/>
|
||||
|
||||
<PiPButton
|
||||
render={(props) => (
|
||||
<Button variant="icon" {...props}>
|
||||
|
||||
@@ -25,6 +25,8 @@ const CaptionButtonDataAttrs = {
|
||||
|
||||
export interface CaptionsButtonProps extends UIComponentProps<'button', CaptionsButtonState>, CaptionButtonCoreProps {}
|
||||
|
||||
const DEBUG = false;
|
||||
|
||||
/**
|
||||
* A button that toggles captions.
|
||||
*
|
||||
@@ -56,6 +58,8 @@ export const CaptionsButton = forwardRef(function CaptionsButton(
|
||||
isDisabled: () => disabled ?? false,
|
||||
});
|
||||
|
||||
if (!DEBUG) return null;
|
||||
|
||||
return renderElement(
|
||||
'button',
|
||||
{ render, className, style },
|
||||
|
||||
Reference in New Issue
Block a user