Socket
Book a DemoInstallSign in
Socket

expo-av

Package Overview
Dependencies
Maintainers
9
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-av

Expo universal module for Audio and Video playback

latest
Source
npmnpm
Version
16.0.7
Version published
Weekly downloads
386K
8.83%
Maintainers
9
Weekly downloads
 
Created

What is expo-av?

The expo-av package is part of the Expo ecosystem and provides a comprehensive set of tools for handling audio and video playback in React Native applications. It allows developers to easily integrate multimedia functionalities such as playing, recording, and controlling audio and video files.

What are expo-av's main functionalities?

Audio Playback

This feature allows you to play audio files in your application. The code sample demonstrates how to load and play an audio file using the Audio module from expo-av.

import { Audio } from 'expo-av';

async function playSound() {
  const { sound } = await Audio.Sound.createAsync(
     require('./assets/sound.mp3')
  );
  await sound.playAsync();
}

Video Playback

This feature allows you to play video files in your application. The code sample demonstrates how to render a video component that plays a video from a given URI.

import { Video } from 'expo-av';

<Video
  source={{ uri: 'https://www.example.com/video.mp4' }}
  rate={1.0}
  volume={1.0}
  isMuted={false}
  resizeMode="cover"
  shouldPlay
  style={{ width: 300, height: 300 }}
/>

Audio Recording

This feature allows you to record audio within your application. The code sample demonstrates how to request permissions, set the audio mode, and start recording audio using the Audio module from expo-av.

import { Audio } from 'expo-av';

async function recordAudio() {
  await Audio.requestPermissionsAsync();
  await Audio.setAudioModeAsync({ allowsRecordingIOS: true });
  const recording = new Audio.Recording();
  await recording.prepareToRecordAsync(Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY);
  await recording.startAsync();
  // You are now recording!
}

Other packages similar to expo-av

Keywords

expo

FAQs

Package last updated on 11 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts