Can I use Twilio Video JS SDK 2.0 in jQuery?

2020-04-16 03:04发布

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?

标签: twilio webrtc
1条回答
迷人小祖宗
2楼-- · 2020-04-16 03:33

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.

查看更多
登录 后发表回答