NPM package¶
Overview¶
Since build 2.0.160 Web SDK is available as NPM package @flashphoner/websdk
The package contains the source code to build a custom bundle and pre-build bundle to use in browser
Demo examples are available in package examples
subfolder
Frameworks support¶
Today, Web SDK NPM package is successfully tested in applications using the following frameworks
Typescript support¶
Since build 2.0.203 exported functions, classes and constants typings are added to use in Typescript applications. Typescript declaration files are placed in the same folder with WebSDK source files
# ls -n @flashphoner/websdk/src/*.d.ts
-rw-r--r-- 1 1000 1000 33 Oct 12 14:16 @flashphoner/websdk/src/constants.d.ts
-rw-r--r-- 1 1000 1000 6768 Oct 12 14:30 @flashphoner/websdk/src/flashphoner-core.d.ts
-rw-r--r-- 1 1000 1000 768 Oct 12 14:44 @flashphoner/websdk/src/room-module.d.ts
Web SDK usage example in React application written in Typescript is described here.
Using RoomApi in React application¶
The following additional import is necessary to make main WebSDK functions work correctly while using RoomApi in React application