# プレゼンテーションモード

- Human documentation: [https://docs.univer.ai/ja-JP/guides/slides/features/core/presentation-mode](https://docs.univer.ai/ja-JP/guides/slides/features/core/presentation-mode)

- Agent Markdown: [https://docs.univer.ai/ja-JP/guides/slides/features/core/presentation-mode.md](https://docs.univer.ai/ja-JP/guides/slides/features/core/presentation-mode.md)

- Requested language: `ja-JP`

- Content language: `ja-JP`

- Documentation version: `1.2.0`

- Source: [slides/features/core/presentation-mode.ja-JP.mdx](https://github.com/dream-num/documentation/blob/dev/content/guides/slides/features/core/presentation-mode.ja-JP.mdx)

---

`UniverSlidesUIPlugin` は現在のデッキのプレゼンテーション再生を登録します。再生はスライド順に進み、スキップ指定されたスライドを除外し、移動ごとに解決済みトランジションを適用します。

## 再生を開始する

```ts
const presentation = univerAPI.getActivePresentation()

if (presentation) {
  await univerAPI.executeCommand('slide.operation.presentation.start', {
    unitId: presentation.getId(),
    fromBeginning: true,
  })
}
```

アクティブスライドから始めるには `fromBeginning: false` を指定し、特定の表示対象スライドには `startSlideId` を渡します。

## 移動と停止

```ts
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 プラグインが登録されていれば再生できます。
