Skip to content

Commit

Permalink
make it non breakable to previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvmail committed May 30, 2020
1 parent 0d1a643 commit 995eaaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
</feature>
</config-file>

<preference name="MANUAL_INIT_AUDIO_DEVICE" default="false"/>

<config-file target="*-Info.plist" parent="ManualInitAudioDevice">
<string>$MANUAL_INIT_AUDIO_DEVICE</string>
</config-file>

<!-- Permission notes -->
<config-file parent="NSCameraUsageDescription" target="*-Info.plist">
<string>This Application uses your camera to make video calls.</string>
Expand Down
5 changes: 5 additions & 0 deletions src/PluginRTCAudioController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ class PluginRTCAudioController {
static private var speakerEnabled: Bool = false

init() {
let shouldManualInit = Bundle.main.object(forInfoDictionaryKey: "ManualInitAudioDevice") as? String

if(shouldManualInit == "FALSE") {
PluginRTCAudioController.initAudioDevices()
}

NotificationCenter.default.addObserver(
self,
Expand Down

0 comments on commit 995eaaf

Please sign in to comment.