smartwinnr-capacitor-daily
v2.0.10
Published
A capacitor plugin for ionic app which allows to use the daily.co call functionality
Readme
smartwinnr-capacitor-daily
A capacitor plugin for ionic app which allows to use the daily.co call functionality
Install
npm install smartwinnr-capacitor-daily
npx cap syncAPI
echo(...)joinCall(...)endCall()addListener('onJoined', ...)addListener('onLeft', ...)addListener('pdfPageChanged', ...)addListener('pdfTrackingUpdate', ...)addListener('pdfLoadError', ...)addListener('pagePresentationTracking', ...)- Interfaces
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
joinCall(...)
joinCall(options: { url: string; token: string; userName?: string; coachingTitle?: string; maximumTime?: number; coachName?: string; testMode?: boolean; enableScreenShare?: boolean; audio_mode_only?: boolean; show_precall?: boolean; userProfileImageURL?: string; coachProfileImageURL?: string; is_sharable_resources_available?: boolean; sharable_resources?: SharableResource[]; }) => Promise<{ isCallJoined: boolean; }>| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { url: string; token: string; userName?: string; coachingTitle?: string; maximumTime?: number; coachName?: string; testMode?: boolean; enableScreenShare?: boolean; audio_mode_only?: boolean; show_precall?: boolean; userProfileImageURL?: string; coachProfileImageURL?: string; is_sharable_resources_available?: boolean; sharable_resources?: SharableResource[]; } |
Returns: Promise<{ isCallJoined: boolean; }>
endCall()
endCall() => Promise<{ isCallEnded: boolean; }>Returns: Promise<{ isCallEnded: boolean; }>
addListener('onJoined', ...)
addListener(eventName: 'onJoined', listenerFunc: () => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | -------------------------- |
| eventName | 'onJoined' |
| listenerFunc | () => void |
Returns: Promise<PluginListenerHandle>
addListener('onLeft', ...)
addListener(eventName: 'onLeft', listenerFunc: () => void) => Promise<PluginListenerHandle>Called when the screen recording is stopped.
Only available on iOS for now.
| Param | Type |
| ------------------ | -------------------------- |
| eventName | 'onLeft' |
| listenerFunc | () => void |
Returns: Promise<PluginListenerHandle>
Since: 3.0.2
addListener('pdfPageChanged', ...)
addListener(eventName: 'pdfPageChanged', listenerFunc: (event: PdfPageChangedEvent) => void) => Promise<PluginListenerHandle>Fires when the active PDF page changes. Only emitted when the call was
joined with is_sharable_resources_available: true. iOS only.
| Param | Type |
| ------------------ | --------------------------------------------------------------------------------------- |
| eventName | 'pdfPageChanged' |
| listenerFunc | (event: PdfPageChangedEvent) => void |
Returns: Promise<PluginListenerHandle>
Since: 3.1.0
addListener('pdfTrackingUpdate', ...)
addListener(eventName: 'pdfTrackingUpdate', listenerFunc: (event: PdfTrackingData) => void) => Promise<PluginListenerHandle>Fires on a fixed interval (default every 2s) with a snapshot of PDF
tracking data, plus a final snapshot when the call ends. Only emitted
when the call was joined with is_sharable_resources_available: true. iOS only.
| Param | Type |
| ------------------ | ------------------------------------------------------------------------------- |
| eventName | 'pdfTrackingUpdate' |
| listenerFunc | (event: PdfTrackingData) => void |
Returns: Promise<PluginListenerHandle>
Since: 3.1.0
addListener('pdfLoadError', ...)
addListener(eventName: 'pdfLoadError', listenerFunc: (event: PdfLoadErrorEvent) => void) => Promise<PluginListenerHandle>Fires if the PDF fails to load or render. iOS only.
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------------- |
| eventName | 'pdfLoadError' |
| listenerFunc | (event: PdfLoadErrorEvent) => void |
Returns: Promise<PluginListenerHandle>
Since: 3.1.0
addListener('pagePresentationTracking', ...)
addListener(eventName: 'pagePresentationTracking', listenerFunc: (event: { entries: PagePresentationEntry[]; }) => void) => Promise<PluginListenerHandle>Emitted each time the active PDF page closes (on page change, document switch, or call end). The payload is the full cumulative list of page presentation entries across the session. iOS only.
| Param | Type |
| ------------------ | ---------------------------------------------------------------------- |
| eventName | 'pagePresentationTracking' |
| listenerFunc | (event: { entries: PagePresentationEntry[]; }) => void |
Returns: Promise<PluginListenerHandle>
Since: 3.1.0
Interfaces
SharableResource
| Prop | Type |
| ------------------ | ------------------- |
| id | string |
| url | string |
| display_name | string |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
PdfPageChangedEvent
| Prop | Type |
| ---------------- | ------------------- |
| pageNumber | number |
| totalPages | number |
PdfTrackingData
| Prop | Type |
| ------------------------ | ------------------------------- |
| totalTimeSpentMs | number |
| totalPages | number |
| currentPage | number |
| pagesViewed | number |
| progressPercentage | number |
| pageTimeEntries | PdfPageTimeEntry[] |
| isFinal | boolean |
PdfPageTimeEntry
| Prop | Type |
| ----------------- | -------------------- |
| pageNumber | number |
| timeSpentMs | number |
| dwellMs | number |
| viewed | boolean |
PdfLoadErrorEvent
| Prop | Type |
| ----------- | ------------------- |
| error | string |
| url | string |
PagePresentationEntry
| Prop | Type |
| ----------------- | ------------------- |
| documentId | string |
| pageNumber | number |
| startTime | number |
| endTime | number |
| timeSpentMs | number |
