This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo LivePhoto
A library that allows displaying Live Photos on iOS.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Here's a simple example of expo-live-photo usage combined with expo-image-picker.
API
import { LivePhotoView } from 'expo-live-photo';
Component
Type: React.Element<LivePhotoViewProps & {
ref: Ref<LivePhotoViewType>
}>
ContentFit • Default: 'contain'Determines how the image should be scaled to fit the container.
'contain'- Scales the image so that its larger dimension fits the target size.'cover'- Scales the image so that it completely fills the target size.
boolean • Default: trueDetermines whether the live photo should also play audio.
(error: LivePhotoLoadError) => voidCalled when an error occurred while loading.
unionThe live photo asset to display.
Acceptable values are: LivePhotoAsset | null
boolean • Default: trueDetermines whether the default iOS gesture recognizer should be used.
When true the playback will start if the user presses and holds on the LivePhotoView.
Types
Literal type: string
Determines how the image should be scaled to fit the container.
'contain'- Scales the image so that its larger dimension fits the target size.'cover'- Scales the image so that it completely fills the target size.
Acceptable values are: 'contain' | 'cover'
A live photo asset.
Note: Due to native limitations, the photo and video parts of the live photo must come from a valid live photo file and be unaltered. When taken, the photo is paired with the video via metadata. If the pairing is broken, joining them into a live photo is impossible.