The plugin use to presentation to second monitor, Capacitor v5 plugin, Only Android
npm install capacitor-presentation-apiThe plugin use to presentation to second monitor
``bash`
npm install presentation-api
npx cap sync
* echo(...)
* isI2CDisplayConnected()
* openLink(...)
* openRawHtml(...)
* addListener('onSuccessLoadUrl', ...)
* addListener('onFailLoadUrl', ...)
* getDisplays()
* Interfaces
`typescript`
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
--------------------
`typescript`
isI2CDisplayConnected() => Promise<{ connected: boolean; }>
Returns: Promise<{ connected: boolean; }>
--------------------
`typescript`
openLink(options: { url: string; }) => Promise<{ success?: any; error?: any; url?: any; }>
| Param | Type |
| ------------- | ----------------------------- |
| options | { url: string; } |
Returns: Promise<{ success?: any; error?: any; url?: any; }>
--------------------
`typescript`
openRawHtml(options: { htmlStr: string; }) => Promise<{ success?: any; error?: any; }>
| Param | Type |
| ------------- | --------------------------------- |
| options | { htmlStr: string; } |
Returns: Promise<{ success?: any; error?: any; }>
--------------------
`typescript`
addListener(eventName: 'onSuccessLoadUrl', listenerFunc: (data: any) => void) => Promise
| Param | Type |
| ------------------ | ----------------------------------- |
| eventName | 'onSuccessLoadUrl' |
| listenerFunc | (data: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'onFailLoadUrl', listenerFunc: (data: any) => void) => Promise
| Param | Type |
| ------------------ | ----------------------------------- |
| eventName | 'onFailLoadUrl' |
| listenerFunc | (data: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
getDisplays() => Promise<{ displays: number; }>
Returns: Promise<{ displays: number; }>
--------------------
#### PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove` | () => Promise<void> |