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
66const { 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
1111const 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
2121const 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
2727const 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
0 commit comments