Types
- Turnkey
- Embed-SDK React
- Embed-SDK Web
This page is an index of types, interfaces, enums used across the Customization API
DefaultContentInterface
Key | Type | Description |
---|---|---|
uid | UidType | uid of the user |
audio | ToggleState | audio mute state |
video | ToggleState | video mute state |
streamType | 'high' | 'low' | stream quality type |
name | string | display name of the user |
screenUid | number | uid of the screenshare stream |
offline | boolean | offline status of the user |
type | 'rtc' | content type |
ExtenedContentInterface
Defined by the user, can contain any information necessary for the corresponding custom content added.
Key | Type | Description |
---|---|---|
type | string | Content of the chat message |
[key: string] | any | Content of the chat message |
ContentInterface: DefaultContentInterface | ExtenedContentInterface
ContentObjects
Key | Type | Description |
---|---|---|
[key: UidType] | ContentInterface | Object containing information necessary to render content view for the corresponding uid |
Selector( e: T ): Partial<T>
Method to subscribe to portions of the app-state. When passed to an app-state accessor method it receives the contents of the associated app-state as argument, it must then selectively return the contents which are intended to be subscribed and eventually returned by the accessor method.
- turnkey
- react-sdk
- web-sdk
import { useRecording } from "customization-api";
const { isRecordingActive, startRecording } = useRecording(
({isRecordingActve ,startRecording, stopRecording}) => {
return({{isRecordingActve, startRecording}})
}
);
/*
#### RecordingContextInterface
isRecordingActve : boolean
startRecording : () => void
stopRecording : () => void
*/
import { useRecording } from "@appbuilder/react";
const { isRecordingActive, startRecording } = useRecording(
({isRecordingActve ,startRecording, stopRecording}) => {
return({{isRecordingActve, startRecording}})
}
);
/*
#### RecordingContextInterface
isRecordingActve : boolean
startRecording : () => void
stopRecording : () => void
*/
import { useRecording } from "@appbuilder/web";
const { isRecordingActive, startRecording } = useRecording(
({isRecordingActve ,startRecording, stopRecording}) => {
return({{isRecordingActve, startRecording}})
}
);
/*
#### RecordingContextInterface
isRecordingActve : boolean
startRecording : () => void
stopRecording : () => void
*/
DispatchType: <T, V>(action: { type: T; value: V }) => void
T: keyof CallbacksInterface
V: Parameters<CallbacksInterface[T]>
Used to dispatch various app builder actions.
- turnkey
- react-sdk
- web-sdk
import { useRtc } from "customization-api";
...
const { dispatch } = useRtc();
...
dispatch({
type: "AddCustomContent",
value: [123, { type: "MyContent", info: "MyInfo" }],
});
import { useRtc } from "@appbuilder/react";
...
const { dispatch } = useRtc();
...
dispatch({
type: "AddCustomContent",
value: [123, { type: "MyContent", info: "MyInfo" }],
});
import { useRtc } from "@appbuilder/web";
...
const { dispatch } = useRtc();
...
dispatch({
type: "AddCustomContent",
value: [123, { type: "MyContent", info: "MyInfo" }],
});
CallbacksInterface
Key | Type | Description |
---|---|---|
EndCall | () => void | Ends the call |
SwitchCamera | () => void | Switches the video device being used [ mobile only ] |
SwapVideo | ( uid: UidType ) => void | Swaps given uid with the uid at the top in activeUids |
DequeVideo | ( uid: UidType ) => void | Shifts given uid to top of activeUids |
UpdateRenderList | ( uid: UidType, user: Partial<ContentInterface> ) => void | Updates contentObject of the given uid in defaultContent |
AddCustomContent | ( uid: UidType, data: ContentInterface ) => void | Adds the given data to defaultContent with given uid as key. |