This topic describes the APIs for the presentation Sub object.
Sub.SlideShowBegin
Listens for the event triggered when a slide show enters full screen.
Syntax
expression.Sub.SlideShowBegin = FunctionExpression: document type, application, object
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for entering full screen. app.Sub.SlideShowBegin = async () => { console.log('Enter'); }; setTimeout(async () => { // Switch to the full screen slide show state. await app.ActivePresentation.SlideShowSettings.Run(); }, 2000); }
Sub.SlideSelectionChanged
Listens for the event triggered when the current page changes.
Syntax
expression.Sub.SlideSelectionChanged = eventHandleExpression: The application object for the presentation document.
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the current page change event. app.Sub.SlideSelectionChanged = async (curryPage) => { console.log('Switched to: ', curryPage); }; }
Sub.SlideShowEnd
Listens for the event triggered when a slide show exits full screen.
Syntax
expression.Sub.SlideShowEnd = FunctionExpression: Application object for the document type
Example
async function example() { await instance.ready(); const app = instance.Application; // Switch to the full screen slide show state. await app.ActivePresentation.SlideShowSettings.Run(); // Listen for the event of exiting full screen. app.Sub.SlideShowEnd = async () => { console.log('Exit'); }; // Exit full screen. setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.Exit(); }, 2000); }
Sub.SlideShowOnNext
Listens for the event triggered by the next animation operation.
Syntax
expression.Sub.SlideShowOnNext = FunctionExpression: Application object of the document type
Example
async function example() { await instance.ready(); const app = instance.Application; // Switch to the full screen slide show state. await app.ActivePresentation.SlideShowSettings.Run(); // Listen for the next animation operation. app.Sub.SlideShowOnNext = async () => { console.log('Next'); }; // Execute the next operation after 3 seconds. setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.GotoNextClick(); }, 3000); }
Sub.SlideShowOnPrevious
Listens for the event triggered by the previous animation operation.
Syntax
expression.Sub.SlideShowOnPrevious = FunctionExpression: Application object (document type)
Example
async function example() { await instance.ready(); const app = instance.Application; // Switch to the full screen slide show state. await app.ActivePresentation.SlideShowSettings.Run(); // Listen for the previous animation operation. app.Sub.SlideShowOnPrevious = async () => { console.log('Previous'); }; // Execute the next step after 3 seconds. setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.GotoNextClick(); }, 3000); // Execute the previous step after 5 seconds. setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.GotoPreClick(); }, 5000); }
Sub.ActiveSlideChange
Listens for the event triggered by page navigation.
Syntax
expression.Sub.ActiveSlideChange = eventHandleExpression: The application object for the presentation document.
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the page navigation event. app.Sub.ActiveSlideChange = async (curryPage) => { console.log('Switched to: ', curryPage); }; }
Sub.VideoFullscreenInfo
Listens for the event triggered when a demo video enters or exits full screen.
This feature is available in JS-SDK 1.1.14 and later.
This feature is supported only on PCs.
Syntax
expression.Sub.VideoFullscreenInfo = eventHandleExpression: application object of a document type
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the event when a demo video enters or exits full screen. app.Sub.VideoFullscreenInfo = async () => { console.log('Full screen state changed.'); }; }
Sub.TriggerPlayEvent
This feature is available in JS-SDK 1.1.9 and later.
Listens for the event triggered when a trigger animation plays.
Syntax
expression.Sub.TriggerPlayEvent = eventHandleExpression: application object of a document type
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the trigger animation event. app.Sub.TriggerPlayEvent = (curryPage) => { console.log('Trigger animation: ', curryPage); }; }
Sub.SlideMove
Listens for the event triggered when a slide is moved.
This feature is available in JS-SDK 1.1.10 and later.
Syntax
expression.Sub.SlideMove = eventHandleExpression: The application object for the presentation document.
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for slide moves. app.Sub.SlideMove = (d) => { console.log('Listening for slide move: ', d); }; }
Sub.PresentationNewSlide
Listens for the event triggered when a new slide is created.
This feature is available in JS-SDK 1.1.10 and later.
Syntax
expression.Sub.PresentationNewSlide = eventHandleExpression: Document-Type Application Object
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for slide moves. app.Sub.SlideMove = (d) => { console.log('Listening for slide move: ', d); }; }
Sub.SlideDelete
Listens for the event triggered when a slide is deleted.
This feature is available in JS-SDK 1.1.10 and later.
Syntax
expression.Sub.SlideDelete = eventHandleExpression: The application object for the presentation document.
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the slide deletion event. app.Sub.SlideDelete = (d) => { console.log('Listening for slide deletion: ', d); }; }
Sub.SlidePlayerChange
Listens for the event triggered when the playback state changes.
This feature is available in JS-SDK 1.1.10 and later.
Syntax
expression.Sub.SlidePlayerChange = eventHandleExpression: The application object for the presentation document.
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the playback state change event. app.Sub.SlidePlayerChange = ({Data}) => { console.log('Listening for playback state change: ', Data); }; }
Sub.SlideMediaChanged
Listens for the event triggered when the video playback state changes.
This feature is available in JS-SDK 1.1.10 and later.
Syntax
expression.Sub.SlideMediaChanged = eventHandleExpression: Document Type's Application Object
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the video playback state change event. app.Sub.SlideMediaChanged = ({Data}) => { console.log('Listening for video playback state change: ', Data); }; }
Sub.SlideLaserPenInkPointsChanged
Listens for the event triggered when the laser pen ink points change.
This feature is available in JS-SDK 1.1.10 and later.
This feature is supported only on PCs.
Syntax
expression.Sub.SlideLaserPenInkPointsChanged = eventHandleExpression: The application object for the presentation document.
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the laser pen ink event. app.Sub.SlideLaserPenInkPointsChanged = ({Data}) => { console.log('Listening for laser pen ink: ', Data); }; }
Sub.SlideInkVisible
Listens for the event triggered when annotations are shown or hidden.
This feature is available in JS-SDK 1.1.10 and later.
This feature is supported only on PCs.
Syntax
expression.Sub.SlideInkVisible = eventHandleExpression: Application object for document type
Example
async function example() { await instance.ready(); const app = instance.Application; // Window object const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // View object const view = await SlideShowWindow.View // Listen for whether to show annotations. app.Sub.SlideInkVisible = ({Data}) => { console.log('Listening for whether to show annotations: ', Data); if(Data.showmark){ setTimeout(() => { view.PointerVisible = false; }, 2000) } }; }
Sub.SlideInkToolbarVisible
You can listen for laser pointer and annotation events.
This feature is available in JS-SDK 1.1.10 and later.
This feature is supported only on PCs.
Syntax
expression.Sub.SlideInkToolbarVisible = eventHandleExpression for a Document Type Application Object
Example
async function example() { await instance.ready(); const app = instance.Application; // Window object const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // View object const view = await SlideShowWindow.View // Listen for whether to use the laser pen and annotations. app.Sub.SlideInkToolbarVisible = ({Data}) => { console.log('Listening for whether to use the laser pen and annotations: ', Data); }; // Show the annotation toolbar. view.MarkerEditVisible = true; }
Sub.SlideChangeOperator
Listens for a server-side event that notifies the current operator after a slide is added, moved, or deleted.
This feature is available in JS-SDK 1.1.11 and later.
Syntax
expression.Sub.SlideChangeOperator = eventHandleExpression: document-type application object
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the server-side notification event sent to the current operator after a slide is added, moved, or deleted. app.Sub.SlideChangeOperator = (Date) => { console.log('Listening for the server-side notification to the current operator after a slide is updated (triggered by adding, moving, or deleting a slide): ', Data); }; }
Sub.LastSlideEnd
Listens for the event triggered when the last slide of a slide show ends.
This feature is available in JS-SDK 1.1.14 and later.
Syntax
expression.Sub.LastSlideEnd = eventHandleExpression: Application object for the document type
Example
async function example() { await instance.ready(); const app = instance.Application; // Listen for the notification event when the slide show ends. app.Sub.LastSlideEnd = (data) => { console.log('Notification for the end of the slide show:', data); }; }