File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
svelte-cloudinary/src/lib/components Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 45
45
import { loadCloudinary } from ' $lib/util.js' ;
46
46
import { checkCloudinaryCloudName } from ' $lib/cloudinary.js' ;
47
47
import { onMount } from ' svelte' ;
48
+ import { env } from ' $env/dynamic/public' ;
48
49
49
50
const idRef = Math .ceil (Math .random () * 100000 );
50
51
type $$Props = CldVideoPlayerProps ;
146
147
}
147
148
148
149
// Validation
149
- checkCloudinaryCloudName (import .meta .env .VITE_PUBLIC_CLOUDINARY_CLOUD_NAME );
150
+ const cloudName = env .PUBLIC_CLOUDINARY_CLOUD_NAME || import .meta .env .VITE_PUBLIC_CLOUDINARY_CLOUD_NAME ;
151
+
152
+ checkCloudinaryCloudName (cloudName );
150
153
151
154
let playerOptions: CloudinaryVideoPlayerOptions = {
152
155
autoplayMode: autoPlay ,
153
- cloud_name: import . meta . env . VITE_PUBLIC_CLOUDINARY_CLOUD_NAME ,
156
+ cloud_name: cloudName ,
154
157
controls ,
155
158
fontFace: fontFace || ' ' ,
156
159
loop ,
You can’t perform that action at this time.
0 commit comments