TP-89230 | universal call sdk
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { default as GenericObject } from '../types/GenericObject.ts';
|
||||
declare class IAdapter {
|
||||
registerOnCallIncoming(callback: () => void): void;
|
||||
registerOnCallConnected(callback: () => void): void;
|
||||
registerOnCallDisconnected(callback: () => void): void;
|
||||
registerOnCallIncoming(callback: (callState: GenericObject) => void): void;
|
||||
registerOnCallConnected(callback: (callState: GenericObject) => void): void;
|
||||
registerOnCallDisconnected(callback: (callState: GenericObject) => void): void;
|
||||
acceptCall(): void;
|
||||
rejectCall(): void;
|
||||
muteCall(): void;
|
||||
|
||||
@@ -73,7 +73,7 @@ const initialState : StateType = {
|
||||
}
|
||||
|
||||
|
||||
function UseCallSdk(adapter : IAdapter) {
|
||||
function UseCallSdk({adapter} : {adapter: IAdapter}) {
|
||||
// @ts-expect-error sdfsf
|
||||
const [callState] = useReducer<any>(reducer, initialState,()=> initialState);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user