Skip to content

Commit 2662a7a

Browse files
authored
Merge pull request #223 from nuxt-modules/feat/3.0.0
Feat/3.0.0
2 parents dd79eb0 + c566cc7 commit 2662a7a

File tree

10 files changed

+33
-18
lines changed

10 files changed

+33
-18
lines changed

.stackblitz/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"nuxt": "^3.11.2"
1212
},
1313
"dependencies": {
14-
"@nuxtjs/cloudinary": "^3.0.0-rc.4"
14+
"@nuxtjs/cloudinary": "^3.0.0"
1515
}
1616
}

.stackblitz/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,10 @@
11691169
vite-plugin-checker "^0.6.4"
11701170
vue-bundle-renderer "^2.0.0"
11711171

1172-
"@nuxtjs/cloudinary@^3.0.0-rc.4":
1173-
version "3.0.0-rc.4"
1174-
resolved "https://registry.yarnpkg.com/@nuxtjs/cloudinary/-/cloudinary-3.0.0-rc.4.tgz#1349ce2d7aae9b1281ba3dedc4538d0b51a8a2c7"
1175-
integrity sha512-MR9Nth1u65u31W0Ia0C4lPJpdHRvtHQ9d0ETKnEg7xNNrYE/TL5C5Pollp9EJwGO1eqtyLnU6Blj2gB2Qjh/BA==
1172+
"@nuxtjs/cloudinary@^3.0.0":
1173+
version "3.0.0"
1174+
resolved "https://registry.yarnpkg.com/@nuxtjs/cloudinary/-/cloudinary-3.0.0.tgz#06031868cc146555929ac7a2cf3d249c27842935"
1175+
integrity sha512-FvFNjAQHeRJxRXH7395gUZq60HUdfwHNuy48xGOdJbfo8A7rcv643AFFuXGrXqKtF5IB8KXZhL/XoVAjnIDuLA==
11761176
dependencies:
11771177
"@cloudinary-util/types" "1.0.2"
11781178
"@cloudinary-util/url-loader" "^5.3.1"

docs/content/2.components/CldUploadWidget.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description:
2+
description:
33
---
44

55
The CldUploadWidget creates a new instance of the [Cloudinary Upload Widget](https://cloudinary.com/documentation/upload_widget) giving you an easy way to add upload capabilities to your Nuxt app.
@@ -68,12 +68,13 @@ To use the above, create a Node-based API route, add the snippet, and use that e
6868

6969
## General Props
7070

71-
| Prop Name | Type | Example |
72-
| ----------------- | -------- | ---------------------------------- |
73-
| children | function | `{ (options) => {} }` |
74-
| options | object | `{ encryption: {...} }` |
75-
| signatureEndpoint | string | `"/api/sign-cloudinary-params.js"` |
76-
| uploadPreset | string | `"my-upload-preset"` |
71+
| Prop Name | Type | Example |
72+
| ----------------- | ------ | ---------------------------------- |
73+
| options | object | `{ encryption: {...} }` |
74+
| signatureEndpoint | string | `"/api/sign-cloudinary-params.js"` |
75+
| uploadPreset | string | `"my-upload-preset"` |
76+
| config | object | `{ cloud: {}, url: {} }` |
77+
| tags | array | `['music', 'sad']` |
7778

7879
## Event Props
7980

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

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"typescript": "^5.4.5"
1818
},
1919
"dependencies": {
20-
"@nuxtjs/cloudinary": "^3.0.0-rc.4"
20+
"@nuxtjs/cloudinary": "^3.0.0"
2121
}
2222
}

docs/pnpm-lock.yaml

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nuxtjs/cloudinary",
3-
"version": "3.0.0-rc.4",
3+
"version": "3.0.0",
44
"description": "Cloudinary module for Nuxt",
55
"license": "MIT",
66
"type": "module",

playground/app.vue

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const colors = {
6363
<CldUploadWidget
6464
v-slot="{ open }"
6565
upload-preset="nuxt-cloudinary-unsigned"
66+
:tags="['sad', 'music']"
6667
>
6768
<button
6869
type="button"

src/runtime/components/CldUploadWidget.vue

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface CldUploadWidgetProps {
4141
signatureEndpoint?: URL | RequestInfo
4242
uploadPreset?: string
4343
config?: ConfigOptions
44+
tags?: Array<string>
4445
}
4546
4647
// Parameters sourced from:
@@ -250,6 +251,14 @@ if (signed) {
250251
}
251252
}
252253
254+
if (props.tags?.length) {
255+
uploadOptions.showAdvancedOptions = true
256+
257+
// eslint-disable-next-line @typescript-eslint/ban-types
258+
uploadOptions.getTags = (cb: Function, prefix: string) =>
259+
cb(prefix ? props.tags?.filter(t => !t.indexOf(prefix)) : props.tags)
260+
}
261+
253262
// Handle result states and callbacks
254263
255264
watch(results, () => {

src/runtime/components/CldVideoPlayer.vue

+3
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 {
@@ -87,6 +88,7 @@ export type CldVideoPlayerProps = Pick<
8788
pictureInPictureToggle?: boolean
8889
chapters?: Record<string | number, string> | boolean
8990
chaptersButton?: boolean
91+
disableRemotePlayback?: boolean
9092
}
9193
9294
const props = withDefaults(defineProps<CldVideoPlayerProps>(), {
@@ -244,6 +246,7 @@ useHead({
244246
:class="playerClassName"
245247
:width="width"
246248
:height="height"
249+
:disableRemotePlayback="disableRemotePlayback"
247250
/>
248251
</div>
249252
</template>

0 commit comments

Comments
 (0)