Skip to content

Commit e3a985d

Browse files
authored
docs: fix readme and android audioTypeOptions docs (#127)
* docs: fix readme and android audioTypeOptions docs * chore: lint
1 parent 770429e commit e3a985d

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public class MainApplication extends Application implements ReactApplication {
5151
@Override
5252
public void onCreate() {
5353
// Place this above any other RN related initialization
54-
// When AudioType is omitted, it'll default to CommunicationAudioType
55-
// use MediaAudioType if user is only consuming audio, and not publishing
54+
// When AudioType is omitted, it'll default to CommunicationAudioType.
55+
// Use MediaAudioType if user is only consuming audio, and not publishing.
5656
LiveKitReactNative.setup(this, new AudioType.CommunicationAudioType());
5757

5858
//...
@@ -66,11 +66,11 @@ Or in your **MainApplication.kt** if you are using RN 0.73+
6666
import com.livekit.reactnative.LiveKitReactNative
6767
import com.livekit.reactnative.audio.AudioType
6868

69-
class MainActivity : ReactActivity() {
70-
override fun onCreate(savedInstanceState: Bundle?) {
69+
class MainApplication : Application, ReactApplication() {
70+
override fun onCreate() {
7171
// Place this above any other RN related initialization
72-
// When AudioType is omitted, it'll default to CommunicationAudioType
73-
// use MediaAudioType if user is only consuming audio, and not publishing
72+
// When AudioType is omitted, it'll default to CommunicationAudioType.
73+
// Use MediaAudioType if user is only consuming audio, and not publishing.
7474
LiveKitReactNative.setup(this, AudioType.CommunicationAudioType())
7575

7676
//...

src/audio/AudioSession.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const LivekitReactNative = NativeModules.LivekitReactNative
3636
*
3737
* See {@link AndroidAudioTypePresets} for pre-configured values.
3838
*
39+
* NOTE: If `audioTypeOptions` is set, this must also be reflected in your android MainApplication setup.
40+
*
3941
* ----
4042
* iOS
4143
*

0 commit comments

Comments
 (0)