React-native-youtube: No sound in silent mode on iOS

Created on 26 Jan 2018  路  2Comments  路  Source: davidohayon669/react-native-youtube

Hello,

If there's a silent mode turned on on iOS, when video is playing, there's no sound for some reason. When I watch videos on other apps on iOS with silent mode turned on, it works just fine. Is there an available fix for this?

Package version: ^1.0.1
RN: 0.49.3

Most helpful comment

For those who arrived here:
Relevant docs section

And for SEO:

  1. Open AppDelegate.m and add:
    #import <AVFoundation/AVFoundation.h>

  2. A bit lower in AppDelegate.m -- In the didFinishLaunchingWithOptions method add:
    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil];

All 2 comments

Ah, okay, sorry, found the fix in the documentation.

For those who arrived here:
Relevant docs section

And for SEO:

  1. Open AppDelegate.m and add:
    #import <AVFoundation/AVFoundation.h>

  2. A bit lower in AppDelegate.m -- In the didFinishLaunchingWithOptions method add:
    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil];

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manjeet-dobble picture manjeet-dobble  路  5Comments

dungnguyen10989 picture dungnguyen10989  路  3Comments

matthiasleitner picture matthiasleitner  路  5Comments

RetroPronghorn picture RetroPronghorn  路  3Comments

dblazeski picture dblazeski  路  5Comments