<!--
{
  "availability" : [
    "LivePhotosKit JS: 1.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LivePhotosKitJS",
  "identifier" : "/documentation/LivePhotosKitJS/LivePhotosKit.Player/video",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "LivePhotosKit JS"
    ],
    "preciseIdentifier" : "instp/LivePhotosKit.Player/video"
  },
  "title" : "video"
}
-->

# video

The playable `HTMLVideoElement` that the Player consumes to obtain video frame data to render to the screen while animating a Live Photo.

```
attribute HTMLVideoElement video;
```

## Discussion

If this property is not populated by a playable `HTMLVideoElement`, the Player cannot play, but can still render as a photo if `photo` is populated.

You can get a value for this property in one of a few ways:

- Set [`videoSrc`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/videoSrc) to a string URL and wait for the resulting download and preparation to complete, at which point the property is populated with the resulting `HTMLVideoElement`.
- Set the [`videoSrc`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/videoSrc) to an `ArrayBuffer` and wait for the resulting preparation to complete, at which point the property is populated with the resulting `HTMLVideoElement`.
- Set the property directly to a fully playable `HTMLVideoElement` whose `canplay` event has fired.

Assigning this property directly causes [`videoSrc`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/videoSrc) to be cleared and set back to `null`. Moreover, if [`videoSrc`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/videoSrc) was recently assigned and a network request or asynchronous decoding is still happening, that activity is also canceled.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)