# VideoSdk CDN problem

**URL:** <https://devforum.zoom.us/t/videosdk-cdn-problem/82784>\
**Category:** Web\
**Tags:** api\
**Created:** [February 8, 2023, 2:18pm UTC](https://devforum.zoom.us/t/videosdk-cdn-problem/82784 "2023-02-08T14:18:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![axel.ojeda](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@axel.ojeda](https://devforum.zoom.us/u/axel.ojeda)\
**Post date:** [February 8, 2023, 2:18pm UTC](https://devforum.zoom.us/t/videosdk-cdn-problem/82784/1 "2023-02-08T14:18:35Z")

</div>

I’ve been working on the VideoSDK webapp and manage to troubleshoot it from a node to plain JS, but now I have a few problems I haven’t been able to fix, I’ll just post them here so anyone can take a jab a them  
First one:  
A preload for ‘URL’ is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.  
I haven’t been able to set the crossorigin correctly mostly due to knowledge or rather lack of

Second:  
The resource was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.  
and when expanded shows  
The resource [https://source.zoom.us/videosdk/1.6.0/lib/audio.simd.wasm](https://source.zoom.us/videosdk/1.6.0/lib/audio.simd.wasm) was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.  
but instead on audio in the URL it also shows video, media, sharing. the are several warnings

And last but not least:  
GET [https://rwcdv2.dv.zoom.us/wc/ping/83150659318?ts=1675864808669&auth=nMnnrHLxNhZWDa6KB3-rz8bLek3cKn0WyhJaKeJswXY&rwcToken=tcrF1jutYZzzkUmExej6N01Ly5-U1coXqYKzCg6dXic&dmz=1](https://rwcdv2.dv.zoom.us/wc/ping/83150659318?ts=1675864808669&auth=nMnnrHLxNhZWDa6KB3-rz8bLek3cKn0WyhJaKeJswXY&rwcToken=tcrF1jutYZzzkUmExej6N01Ly5-U1coXqYKzCg6dXic&dmz=1) 404 (Not Found)

and this one, no idea where it came from, yesterday was only the first 2 and today I got the 3rd one

And to invoke the CDN I used this line of code

The program is based on a almost unaltered version of the purejs sample but it got modified to use CDN instead of NPM and took the nodes out with this few lines of code which did the trick  
const ZoomVideo = window.WebVideoSDK.default  
const client = ZoomVideo.createClient()  
client.init(‘en-US’, ‘CDN’)  
let stream

Also to replicate the errors and to help out at this point  
I first mixed every part of the src folder into a single file with the index.html and the procceded to delete all the exports and imports  
I deleted this piece of code from the session joiner:  
if (!isSafari) {  
await startAudioMuted();  
}  
also I replaced the VideoSDK from the imports with const client = ZoomVideo.createClient()

you will find a few other problems in the javascript part but those are solved by instinct mostly and if you follow that you should be able to replicate the whole problem

---

<div class="post-metadata">

**Author:** ![axel.ojeda](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@axel.ojeda](https://devforum.zoom.us/u/axel.ojeda)\
**Post date:** [February 8, 2023, 2:35pm UTC](https://devforum.zoom.us/t/videosdk-cdn-problem/82784/2 "2023-02-08T14:35:05Z")

</div>

So I made a GitHub with the code so you can skip most of it and just run it:

> **[GitHub - Axel0fficial/ZoomVideoSDKImplementation: A single page app with a...](https://github.com/Axel0fficial/ZoomVideoSDKImplementation)**
>
> A single page app with a single file that implements the sample-app-videosdk/purejs - GitHub - Axel0fficial/ZoomVideoSDKImplementation: A single page app with a single file that implements the sam...

Just to help everyone 😃

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 11, 2023, 12:35am UTC](https://devforum.zoom.us/t/videosdk-cdn-problem/82784/3 "2023-03-11T00:35:25Z")

</div>

Closed on March 11, 2023, 12:35am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
