Skip to content

Commit ce32838

Browse files
committed
feat-#222: disableRemotePlayback for CldVideoPlayer
1 parent 7c0384a commit ce32838

File tree

3 files changed

+35
-22
lines changed

3 files changed

+35
-22
lines changed

docs/content/2.components/CldVideoPlayer.md

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Adding a button to select chapters (you can pass `chapters` prop as a boolean if
137137
| pictureInPictureToogle | boolean | - | Enable Picture in Picture mode | true |
138138
| chaptersButton | boolean | - | Enable Chapters button | true |
139139
| chapters | object/boolean | - | Chapters configuration | { 0: 'Chapter 1', 6: 'Chapter 2', 9: 'Chapter 3' } |
140+
| disableRemotePlayback | boolean | - | Indicate if media element may have a remote playback UI | true |
140141

141142
## Colors Prop
142143

playground/app.vue

+32-22
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
<script lang="ts" setup>
22
// Usage of `useCldImageUrl` composable
3-
const { url } = useCldImageUrl({ options: { src: "/cld-sample-5.jpg" } });
4-
console.log(url);
3+
const { url } = useCldImageUrl({ options: { src: '/cld-sample-5.jpg' } })
4+
console.log(url)
55
66
const { url: videoUrl } = useCldVideoUrl({
7-
options: { src: "videos/mountain-stars" },
8-
});
9-
console.log(videoUrl);
7+
options: { src: 'videos/mountain-stars' },
8+
})
9+
console.log(videoUrl)
1010
1111
const mediaAssets = [
12-
{ tag: "electric_car_product_gallery_demo" }, // by default mediaType: "image"
13-
{ tag: "electric_car_product_gallery_demo", mediaType: "video" },
14-
{ tag: "electric_car_360_product_gallery_demo", mediaType: "spin" },
15-
];
12+
{ tag: 'electric_car_product_gallery_demo' }, // by default mediaType: "image"
13+
{ tag: 'electric_car_product_gallery_demo', mediaType: 'video' },
14+
{ tag: 'electric_car_360_product_gallery_demo', mediaType: 'spin' },
15+
]
1616
17-
const buttonId = "open-btn";
17+
const buttonId = 'open-btn'
1818
19-
const cldVideoRef = ref();
19+
const cldVideoRef = ref()
2020
2121
const chapters = {
22-
0: "Chapter 1",
23-
6: "Chapter 2",
24-
9: "Chapter 3",
25-
};
22+
0: 'Chapter 1',
23+
6: 'Chapter 2',
24+
9: 'Chapter 3',
25+
}
2626
2727
const colors = {
28-
accent: "#ff0000",
29-
base: "#00ff00",
30-
text: "#0000ff",
31-
};
28+
accent: '#ff0000',
29+
base: '#00ff00',
30+
text: '#0000ff',
31+
}
3232
</script>
3333

3434
<template>
35-
<button :id="buttonId">Select Image or Video</button>
35+
<button :id="buttonId">
36+
Select Image or Video
37+
</button>
3638
<CldMediaLibrary
3739
api-key="12345"
3840
:button-id="buttonId"
@@ -43,7 +45,10 @@ const colors = {
4345
cloud-name="demo"
4446
:button-id="buttonId"
4547
/>
46-
<CldOgImage src="cld-sample-2" twitter-title="test" />
48+
<CldOgImage
49+
src="cld-sample-2"
50+
twitter-title="test"
51+
/>
4752
<CldVideoPlayer
4853
ref="cldVideoRef"
4954
width="1620"
@@ -60,7 +65,12 @@ const colors = {
6065
upload-preset="nuxt-cloudinary-unsigned"
6166
:tags="['sad', 'music']"
6267
>
63-
<button type="button" @click="open">Upload an Image</button>
68+
<button
69+
type="button"
70+
@click="open"
71+
>
72+
Upload an Image
73+
</button>
6474
</CldUploadWidget>
6575
<CldUploadButton upload-preset="nuxt-cloudinary-unsigned">
6676
Upload

src/runtime/components/CldVideoPlayer.vue

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export interface CloudinaryVideoPlayerOptions {
3030
pictureInPictureToggle?: boolean
3131
chapters?: Record<string | number, string> | boolean
3232
chaptersButton?: boolean
33+
disableRemotePlayback?: boolean
3334
}
3435
3536
export interface CloudinaryVideoPlayerOptionsColors {
@@ -244,6 +245,7 @@ useHead({
244245
:class="playerClassName"
245246
:width="width"
246247
:height="height"
248+
:disableRemotePlayback="disableRemotePlayback"
247249
/>
248250
</div>
249251
</template>

0 commit comments

Comments
 (0)