![]() |
Audio-Session-Initialisierung für iOS
Hi,
ich muss für einen Test mit einer Video-Chat-Software folgendes Settings vornehmen: "Was Sie versuchen können, wäre, falls noch nicht gemacht, die AVAudioSession auf Mode AVAudioSession.Mode.videoChat einzustellen und die AVAudioSession.CategoryOption.mixWithOthers hinzuzufügen." Grund ist, dass aktuell sobald ich den Video-Chat-Raum betrete, die in der App abgespielte Musik aufhört zu spielen. Jetzt habe ich dies mit folgendem Code versucht:
Delphi-Quellcode:
Ich bekomme bei den Aufrufen aber einen OSStatus-Fehler -50 Fehler zurück.
procedure TicTrainerF.initIOSAudioSession();
var AudioSession: AVAudioSession; LErrorPtr: Pointer; LError: NSError; hasError: boolean; begin mlog.info('initIOSAudioSession'); hasError:=false; LErrorPtr := nil; AudioSession := TAVAudioSession.Wrap(TAVAudioSession.OCClass.sharedInstance); if (not hasError) then begin AudioSession.setMode(CocoaNSStringConst(libAVFoundation, 'AVAudioSessionModeVideoChat'),@LErrorPtr); if (LErrorPtr <> nil) then begin LError := TNSError.Wrap(LErrorPtr); mlog.info('initIOSAudioSession-Error (setMode): '+NSStrToStr(LError.localizedDescription)); hasError:=true; end; end; if (not hasError) then begin AudioSession.setCategory(CocoaNSStringConst(libAVFoundation, 'AVAudioSessionCategoryOptionMixWithOthers'),@LErrorPtr); if (LErrorPtr <> nil) then begin LError := TNSError.Wrap(LErrorPtr); mlog.info('initIOSAudioSession-Error (setCategory): '+NSStrToStr(LError.localizedDescription)); hasError:=true; end; end; if (not hasError) then mlog.info('initIOSAudioSession: finished successfully'); end; Was ist hier noch falsch? Grüße, Philipp |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz