プレゼンテーションモード
UniverSlidesUIPlugin は現在のデッキのプレゼンテーション再生を登録します。再生はスライド順に進み、スキップ指定されたスライドを除外し、移動ごとに解決済みトランジションを適用します。
再生を開始する
TypeScript
const presentation = univerAPI.getActivePresentation()if (presentation) { await univerAPI.executeCommand('slide.operation.presentation.start', { unitId: presentation.getId(), fromBeginning: true, })}アクティブスライドから始めるには fromBeginning: false を指定し、特定の表示対象スライドには startSlideId を渡します。
移動と停止
TypeScript
await univerAPI.executeCommand('slide.operation.presentation.next')await univerAPI.executeCommand('slide.operation.presentation.previous')await univerAPI.executeCommand('slide.operation.presentation.go-to-slide', { slideId: 'summary-slide',})await univerAPI.executeCommand('slide.operation.presentation.stop')最後の表示対象スライドの後で「次へ」を実行すると再生が終了します。先頭で「前へ」を実行すると false を返します。
ブラウザー動作
全画面表示とデュアルスクリーン表示はブラウザー API に依存します。ポップアップブロックを避けるため、視聴者ウィンドウはユーザー操作から直接開いてください。編集を無効にした閲覧専用 UI でも、UI プラグインが登録されていれば再生できます。
このガイドはいかがですか?