question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Activate audio for videos using expo-av while iOS Silent Switch is On

See original GitHub issue

Is it possible to ignore iPhone devices Silent Switch and still display audio on videos, when using expo-av library? I saw some comments on how to do it in pure React Native using a flag like ignoreSilentSwitch but this didn’t work for expo-av Video component.

Any ideas?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:22 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
maurovisintincommented, Nov 26, 2020

Something like

useEffect(() => { Audio.setAudioModeAsync({ playsInSilentModeIOS: true }); });

6reactions
LucasPMMcommented, Jul 13, 2022

I just solved by adding playsInSilentModeIOS: true on my App.tsx. This was applied for the entire application:

import { Audio } from "expo-av";
...

useEffect(() => {
    ...
    Audio.setAudioModeAsync({ playsInSilentModeIOS: true });
}, []);
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to enable expo video sound to play when silent switch is ...
You just have to run a silent sound and make it playAsync. It can work useEffect(() => { const setAudioMode = async ()...
Read more >
Audio - Expo Documentation
expo-av allows you to implement audio playback and recording in your app. ... On iOS, each background feature requires a special key in...
Read more >
Configuring the Audio Playback of iOS and tvOS Apps
When your app plays audio, it silences any other background audio. ... In iOS, setting the Ring/Silent switch to silent mode silences your...
Read more >
How to Record Audio using React Native Expo
Music recording JavaScript code for Android and iOS devices using React Native Expo. Hello, React Native developers! When you are working on some...
Read more >
Audio playback in background | Voters - Expo - Canny
iOS : Enable audio playback in background via your ... I don't want to have to use RN Track Player when I'm already...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found