---
title: "media.options: Playback — Slide kit command — Kition"
description: "Sets audio/video playback options (autoplay, loop, rewind, volume, trim, fade). Applies to the shapes in `ids` (on slide `onSlide`, from 1) or else the selection."
canonical: "https://developer.kition.ai/docs/kits/slide/commands/media.options"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/slide/commands/media.options](https://developer.kition.ai/docs/kits/slide/commands/media.options)

# media.options

**Playback.** Sets audio/video playback options (autoplay, loop, rewind, volume, trim, fade). Applies to the shapes in `ids` (on slide `onSlide`, from 1) or else the selection.

- Kit: Slide 0.1.0 (.kslide and .pptx); reference: [Slide kit commands](https://developer.kition.ai/docs/kits/slide.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `acrossSlides` | `boolean` | no |  |
| `autoplay` | `boolean` | no |  |
| `fadeIn` | `number` | no | milliseconds |
| `fadeOut` | `number` | no | milliseconds |
| `fullScreen` | `boolean` | no |  |
| `hide` | `boolean` | no | hide while not playing |
| `ids` | `(integer \| string)[]` | no |  |
| `loop` | `boolean` | no |  |
| `onSlide` | `integer` | no | the slide the ids are on, from 1 |
| `rewind` | `boolean` | no | rewind after playing |
| `trimEnd` | `number` | no | milliseconds |
| `trimStart` | `number` | no | milliseconds |
| `volume` | `number (≥ 0, ≤ 1)` | no | 0 to 1 |

## Call through slide_run

```text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "media.options" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `acrossSlides`, `autoplay`, `fadeIn`, `fadeOut`, `fullScreen`, `hide`, `ids`, `loop`, `onSlide`, `rewind`, `trimEnd`, `trimStart`, `volume`. slide_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "acrossSlides": {
      "type": "boolean"
    },
    "autoplay": {
      "type": "boolean"
    },
    "fadeIn": {
      "description": "milliseconds",
      "type": "number"
    },
    "fadeOut": {
      "description": "milliseconds",
      "type": "number"
    },
    "fullScreen": {
      "type": "boolean"
    },
    "hide": {
      "description": "hide while not playing",
      "type": "boolean"
    },
    "ids": {
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Shape"
      ]
    },
    "loop": {
      "type": "boolean"
    },
    "onSlide": {
      "description": "the slide the ids are on, from 1",
      "type": "integer"
    },
    "rewind": {
      "description": "rewind after playing",
      "type": "boolean"
    },
    "trimEnd": {
      "description": "milliseconds",
      "type": "number"
    },
    "trimStart": {
      "description": "milliseconds",
      "type": "number"
    },
    "volume": {
      "description": "0 to 1",
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    }
  },
  "type": "object",
  "x-khp-position": "independent"
}
```

Generated from the command list of @kition/slide-darwin-arm64@0.1.0 and the kit itself (slide_commands through @kition/cli@0.1.1, built from KitionAI/kition-slide@7ef3d11).
