how to use adapter.js of webRTC-adapter?

前端 未结 2 606
无人及你
无人及你 2021-01-22 19:07

I am writing a WebRTC application and have the following problem:

I want to use the adapter.js library.

I have the following index.html:



        
2条回答
  •  太阳男子
    2021-01-22 19:26

    require is used (and defined) in Node.js environments to load modules. (Not exclusively, for more information check here).

    If you downloaded an adapter.js version from here and include it the way you do (via script tags), you can simple delete the require(...) line and you should be good to go.

    Edit: added an example

    console.log(adapter.browserDetails.browser);

提交回复
热议问题