Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[Videos] Add iOS function to set `AVAudioSession.CategoryOptions` to `.mixWithOthers` (#4905)

* audio mixing pref

* lint

authored by

Hailey and committed by
GitHub
cb574b7b a4f0c9c7

+26
+10
modules/expo-bluesky-swiss-army/ios/PlatformInfo/ExpoPlatformInfoModule.swift
··· 7 7 Function("getIsReducedMotionEnabled") { 8 8 return UIAccessibility.isReduceMotionEnabled 9 9 } 10 + 11 + Function("setAudioMixWithOthers") { (mixWithOthers: Bool) in 12 + var options: AVAudioSession.CategoryOptions 13 + if mixWithOthers { 14 + options = [.mixWithOthers] 15 + } else { 16 + options = [] 17 + } 18 + try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default, options: options) 19 + } 10 20 } 11 21 }
+6
modules/expo-bluesky-swiss-army/src/PlatformInfo/index.native.ts
··· 1 + import {Platform} from 'react-native' 1 2 import {requireNativeModule} from 'expo-modules-core' 2 3 3 4 const NativeModule = requireNativeModule('ExpoPlatformInfo') ··· 5 6 export function getIsReducedMotionEnabled(): boolean { 6 7 return NativeModule.getIsReducedMotionEnabled() 7 8 } 9 + 10 + export function setAudioMixWithOthers(mixWithOthers: boolean): void { 11 + if (Platform.OS !== 'ios') return 12 + NativeModule.setAudioMixWithOthers(mixWithOthers) 13 + }
+4
modules/expo-bluesky-swiss-army/src/PlatformInfo/index.ts
··· 3 3 export function getIsReducedMotionEnabled(): boolean { 4 4 throw new NotImplementedError() 5 5 } 6 + 7 + export function setAudioMixWithOthers(mixWithOthers: boolean): void { 8 + throw new NotImplementedError({mixWithOthers}) 9 + }
+6
modules/expo-bluesky-swiss-army/src/PlatformInfo/index.web.ts
··· 1 + import {NotImplementedError} from '../NotImplemented' 2 + 1 3 export function getIsReducedMotionEnabled(): boolean { 2 4 if (typeof window === 'undefined') { 3 5 return false 4 6 } 5 7 return window.matchMedia('(prefers-reduced-motion: reduce)').matches 6 8 } 9 + 10 + export function setAudioMixWithOthers(mixWithOthers: boolean): void { 11 + throw new NotImplementedError({mixWithOthers}) 12 + }