Conversation
| unmountFunction.current = await SDK.renderPanel("panel-section"); | ||
|
|
||
| if (eventViewModel.current) { | ||
| await eventViewModel.current.didShowPanel(); |
There was a problem hiding this comment.
Callback to the SDK so we know the panel was shown
|
|
||
| const showPanel = async () => { | ||
| setPanelVisible(true); | ||
| unmountFunction.current = await SDK.renderPanel("panel-section"); |
There was a problem hiding this comment.
Unmount function to be used as cleanup function afterwards
| SDK.configure({ | ||
| siteID: "69388ee52b46b639897261f1", | ||
| }); |
There was a problem hiding this comment.
initialize SDK as first thing
| await SDK.userDidStopWatchingEvent({ | ||
| pageId: "69388ee52b46b63989726228", | ||
| }); |
There was a problem hiding this comment.
Call userDidStopWatchingEvent when you want to quit the current event watch
| SDK.configure({ | ||
| siteID: SITE_ID, | ||
| }); |
There was a problem hiding this comment.
initialize SDK as first thing
| await SDK.userDidStopWatchingEvent({ | ||
| pageId: PAGE_ID, | ||
| }); | ||
| } else { | ||
| setVideoVisible(true); | ||
| eventViewModel.current = await SDK.userDidStartWatchingEvent({ | ||
| pageId: PAGE_ID, | ||
| delegate, | ||
| useProdEnv: false, | ||
| }); |
There was a problem hiding this comment.
Call userDidStopWatchingEvent to stop the current event watch, and userDidStartWatchingEvent to start a new one
Use useProdEnv = false for dev mode
| const delegate = new AppDelegate(); | ||
|
|
||
| const PAGE_ID = "69388ee52b46b63989726228"; | ||
| const SITE_ID = "69388ee52b46b639897261f1"; |
There was a problem hiding this comment.
This siteId and pageId combination is configured to deliver the hello world panel.
Once completed and ready to move forward with custom panel delivery these ID's will be replaced with ones specific to your site and it's pages.
No description provided.