@videosdk.live/react-sdk
Advanced tools
Comparing version 0.1.82 to 0.1.83
@@ -9,2 +9,4 @@ // Type definitions for @videosdk.live/react-sdk 0.1 | ||
import { Connection } from './connection'; | ||
import { CameraDeviceInfo, DeviceInfo, MicrophoneDeviceInfo, PlaybackDeviceInfo } from './deviceInfo'; | ||
import { Permission } from './permission'; | ||
import { Meeting } from './meeting'; | ||
@@ -322,2 +324,34 @@ import { Participant } from './participant'; | ||
* | ||
* --- | ||
* @param onDeviceChanged - It's a callback which gets triggered whenever a media device such as a camera, microphone, or speaker is connected to or removed from the system. | ||
* | ||
* **Code Example :** | ||
* ```js | ||
* function onDeviceChanged(devices) { | ||
* console.log("onDeviceChanged", devices); | ||
* } | ||
* const {} = useMediaDevice({ | ||
* onDeviceChanged | ||
* }); | ||
* ``` | ||
* --- | ||
* @returns This will returns methods and events associated with media devices and permissions. You can refer this [API Reference](https://docs.videosdk.live/react/api/sdk-reference/use-mediaDevice/introduction) | ||
*/ | ||
export function useMediaDevice( | ||
{ | ||
onDeviceChanged, | ||
}?: { | ||
onDeviceChanged?: (devices: Promise<Array<DeviceInfo>>) => void; | ||
}, | ||
): { | ||
getDevices: () => Promise<Array<DeviceInfo>>; | ||
getCameras: () => Promise<Array<CameraDeviceInfo>>; | ||
getMicrophones: () => Promise<Array<MicrophoneDeviceInfo>>; | ||
getPlaybackDevices: () => Promise<Array<PlaybackDeviceInfo>>; | ||
checkPermissions: (permissions?: Permission) => Promise<Map<string, boolean>>; | ||
requestPermission: (permissions?: Permission) => Promise<Map<string, boolean>>; | ||
}; | ||
/** | ||
* | ||
* @param participantId - Id of the participant. | ||
@@ -1090,2 +1124,27 @@ * --- | ||
/** | ||
* @param timeoutDuration - This will accept the timeoutDuration. | ||
* | ||
* **Code Example** | ||
* ```js | ||
* import { getNetworkStats } from "@videosdk.live/react-sdk"; | ||
* | ||
* try{ | ||
* const options = { timeoutDuration: 45000 }; | ||
* const networkStats = await VideoSDK.getNetworkStats(options); | ||
* console.log("networkStats", networkStats); | ||
* }catch(Ex) | ||
* { | ||
* console.log("exception",Ex); | ||
* } | ||
* ``` | ||
*/ | ||
export function getNetworkStats({ | ||
timeoutDuration | ||
}?: { | ||
timeoutDuration?: | ||
| number | ||
| undefined; | ||
}): Promise<{downloadSpeed: number,uploadSpeed: number}>; | ||
export const Constants: { | ||
@@ -1143,2 +1202,7 @@ errors: { | ||
}; | ||
permission: { | ||
AUDIO: Permission; | ||
VIDEO: Permission; | ||
AUDIO_AND_VIDEO: Permission; | ||
}; | ||
}; |
{ | ||
"name": "@videosdk.live/react-sdk", | ||
"version": "0.1.82", | ||
"version": "0.1.83", | ||
"license": "ISC", | ||
@@ -76,5 +76,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@videosdk.live/js-sdk": "0.0.78", | ||
"@videosdk.live/js-sdk": "0.0.80", | ||
"events": "^3.3.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
467862
15
5160
+ Added@videosdk.live/js-sdk@0.0.80(transitive)
- Removed@videosdk.live/js-sdk@0.0.78(transitive)
Updated@videosdk.live/js-sdk@0.0.80