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

# videoSrc

A reference to the source of the video component of this Live Photo.

```
attribute String,ArrayBuffer videoSrc;
```

## Discussion

Set this property to one of three types of value:

- A string URL
- An `ArrayBuffer` instance that may already be available
- `null` (to clear the Player’s video)

Changing this value causes the [`video`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/video) property (the `HTMLVideoElement` consumed by the Player for rendering) to be initially set to `null`. If the new value assigned is a string URL or an `ArrayBuffer`, a round of loading and decoding activity begins, eventually resulting in the video property being populated with the newly loaded video. Only a string URL produces a network request as part of this loading process.

Changing this value while loading activity from a previous assignment is in progress causes the previous loading activity to abort.

Once the file associated with this property is obtained, it is parsed to automatically determine the values of the [`photoTime`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/photoTime) and [`frameTimes`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/frameTimes) properties. These properties must themselves have their values before playback can begin.

Note: If, due to the architecture of your web app or web page, a `<video>` element is available and already sufficiently loaded to be seekable, it might be written directly to the [`video`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/video) property. However, when you bypass `videoSrc` in this manner, [`photoTime`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/photoTime) and [`frameTimes`](/documentation/LivePhotosKitJS/LivePhotosKit.Player/frameTimes) are not automatically detected. You have to provide those values by some other means. (see their documentation for more information).

Declarative markup attribute: `data-video-src`

---

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)