Skip to content

Commit fc61a36

Browse files
committed
review: improve comments
1 parent 1bc2abb commit fc61a36

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/controls.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,28 @@ export interface OutputDevice {
4040
id: string;
4141
name: string;
4242
/**
43-
* Reverse engineered:
44-
* - on iOS always true if output is routed to speaker. In other case iOS on declare a `dummy` id device.
45-
* In that case then ElementCalls manually append a earpiece device with id `EARPIECE_CONFIG_ID` anb `{ type: "earpiece" }`
43+
* `forEarpiece` in an iOS only flag, that will be set on the default speaker device.
44+
* The default speaker device will be used for the earpiece mode by
45+
* using a stereo pan and reducing the volume significantly. (in combination this is similar to a dedicated earpiece mode)
46+
* - on iOS this is true if output is routed to speaker.
47+
* In that case then ElementCalls manually appends an earpiece device with id `EARPIECE_CONFIG_ID` and `{ type: "earpiece" }`
4648
* - on Android this is unused.
4749
*/
4850
forEarpiece?: boolean;
4951
/**
50-
* Reverse engineered:
52+
* Is the device the OS earpiece audio configuration?
5153
* - on iOS always undefined
5254
* - on Android true for the `TYPE_BUILTIN_EARPIECE`
5355
*/
5456
isEarpiece?: boolean;
5557
/**
56-
* Reverse engineered:
58+
* Is the device the OS default speaker:
5759
* - on iOS always true if output is routed to speaker. In other case iOS on declare a `dummy` id device.
5860
* - on Android true for the `TYPE_BUILTIN_SPEAKER`
5961
*/
6062
isSpeaker?: boolean;
6163
/**
62-
* Reverse engineered:
64+
* Is the device the OS default external headset (bluetooth):
6365
* - on iOS always undefined.
6466
* - on Android true for the `TYPE_BLUETOOTH_SCO`
6567
*/

src/state/AndroidControlledAudioOutput.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export class AndroidControlledAudioOutput implements MediaDevice<
7070
"[MediaDevices AndroidControlledAudioOutput]",
7171
);
7272

73-
// STATE stream: the current state of the controller, including the list of available devices and the selected device.
73+
/**
74+
* STATE stream: the current state of the controller, including the list of available devices and the selected device.
75+
*/
7476
private readonly controllerState$: Behavior<ControllerState>;
7577

7678
/**

0 commit comments

Comments
 (0)