File tree Expand file tree Collapse file tree 4 files changed +38
-0
lines changed
docs/pages/cldvideoplayer
next-cloudinary/src/components/CldVideoPlayer Expand file tree Collapse file tree 4 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,13 @@ import Table from '../../components/Table';
300300 description: (<span ><strong >Check Cloudinary Video Player Api Docs</strong ></span >),
301301 example: (<span ><strong >Check Cloudinary Video Api Docs</strong ></span >)
302302 },
303+ {
304+ prop: ' disableRemotePlayback' ,
305+ type: ' boolean' ,
306+ default: ' false' ,
307+ description: ' Disable the ability to use remote playback (cast video) on the video element' ,
308+ example : () => (<code >true</code >)
309+ },
303310 {
304311 prop: ' loop' ,
305312 type: ' boolean' ,
Original file line number Diff line number Diff line change @@ -111,6 +111,34 @@ Utilizes the browser's Picture-in-Picture API to create a floating video on top
111111 ```
112112</CodeBlock >
113113
114+ ### Disable Remote Playback
115+
116+ Prevents the video from being cast to remote devices by disabling the remote playback feature.
117+
118+ <HeaderImage >
119+ <CldVideoPlayer
120+ id = " disable-remote-playback"
121+ width = " 2048"
122+ height = " 1080"
123+ src = { ` ${process .env .VIDEOS_DIRECTORY }/dog-running-snow ` }
124+ disableRemotePlayback
125+ />
126+ </HeaderImage >
127+
128+ <CodeBlock >
129+ ``` jsx copy showLineNumbers
130+ import { CldVideoPlayer } from ' next-cloudinary' ;
131+
132+ < CldVideoPlayer
133+ id= " disable-remote-playback"
134+ width= " 1620"
135+ height= " 1080"
136+ src= " <Your Public ID>"
137+ disableRemotePlayback
138+ / >
139+ ```
140+ </CodeBlock >
141+
114142## Player Customization
115143
116144### Chapters & Selector
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const CldVideoPlayer = (props: CldVideoPlayerProps) => {
1717 const {
1818 className,
1919 config,
20+ disableRemotePlayback,
2021 height,
2122 id,
2223 onDataLoad,
@@ -172,6 +173,7 @@ const CldVideoPlayer = (props: CldVideoPlayerProps) => {
172173 className = { playerClassName }
173174 width = { width }
174175 height = { height }
176+ disableRemotePlayback = { disableRemotePlayback }
175177 />
176178 < Script
177179 id = { `cloudinary-videoplayer-${ playerId } ` }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { GetCldVideoUrlOptions } from '../../helpers/getCldVideoUrl';
1111export type CldVideoPlayerProps = Omit < GetVideoPlayerOptions , "cloud_name" | "autoplayMode" | "publicId" | "secure" | "showLogo" | "logoImageUrl" | "logoOnclickUrl" > & {
1212 className ?: string ;
1313 config ?: ConfigOptions ;
14+ disableRemotePlayback ?: boolean ;
1415 id ?: string ;
1516 logo ?: boolean | CldVideoPlayerPropsLogo ;
1617 onDataLoad ?: Function ;
You can’t perform that action at this time.
0 commit comments