Contents

metadataVideoSrc

A string or array buffer that contains metadata about the properties of a Live Photo.

Declaration

attribute String,ArrayBuffer metadataVideoSrc;

Discussion

If you have a video asset that does not include a readable photoTime and/or frameTimes, you can set this property to a string URL or ArrayBuffer referencing the original MOV file that was captured by an iPhone. That file is then parsed in the same manner as those loaded thorough videoSrc. It serves as an alternate source for the photoTime and frameTimes properties if they are not otherwise available.

If this property is set to a URL, the file referred to by the URL is loaded only until the point at which frameTimes and photoTime can be determined from it. The network request is then terminated early to avoid downloading unneeded data. Using this feature to allow the Player to automatically determine frameTimes and/or photoTime may be easier than finding them yourself and providing them manually. However, it comes at the expense of an extra network request incurred by loading the beginning of the file.

You can set this property to an ArrayBuffer (for example, videoSrc or photoSrc). However, if you have an ArrayBuffer for the original video file, you can set that ArrayBuffer here to provide frameTimes and photoTime values. An even simpler alternative is to just use that ArrayBuffer as the video source to begin with. (If you supply an ArrayBuffer here instead of a URL, there will be no network request, and no performance cost.)

The performance implications of using this property on a small page viewed by audiences with reliable, low-latency connections are probably minimal. However, do not use this approach when performance is critical.

See Also

Instance Properties