---
title: HTMLVideoElement.autoPictureInPicture
slug: Web/API/HTMLVideoElement/autoPictureInPicture
tags:
  - API
  - HTML
  - HTML DOM
  - HTMLVideoElement
  - Media
  - Picture-in-Picture
  - Picture-in-Picture API
  - Property
  - Reference
  - Video
  - pip
browser-compat: api.HTMLVideoElement.autoPictureInPicture
---
{{APIRef("HTML DOM")}}

The {{domxref("HTMLVideoElement")}}
**`autoPictureInPicture`** property reflects the HTML
attribute indicating whether the video should enter or leave picture-in-picture mode
automatically.

## Syntax

```js
autoPictureInPicture = htmlVideoElement.autoPictureInPicture;
```

### Value

A boolean value that is `true` if the video should enter or
leave picture-in-picture mode automatically when changing tab and/or application.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [`HTMLVideoElement`](/en-US/docs/Web/API/HTMLVideoElement)
