Can I use Twilio Video JS SDK 2.0 in jQuery?

被刻印的时光 ゝ 提交于 2019-12-02 09:01:47

问题


The official documentation does not have any example for implementation in jQuery or plain JavaScript. We do not use Node for our projects unless specifically demanded which is rare.

Do we really have to limit our projects to v1? Or can someone point me to a related tutorial?


回答1:


Twilio developer evangelist here.

If you're not using Node to install dependencies and build a client bundle then you can still use Twilio Video SDK version 2. You can do so by loading the SDK from the CDN here:

<script src="//media.twiliocdn.com/sdk/js/video/releases/2.0.0-beta11/twilio-video.min.js"></script>

When you include that on the page you will then find the global Twilio object. You can use all the video functions from the Video namespace.

const Video = Twilio.Video;
Video.connect(token);

You can see examples of this in the Video SDK documentation.

Let me know if this helps at all.



来源:https://stackoverflow.com/questions/56914667/can-i-use-twilio-video-js-sdk-2-0-in-jquery

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!