Skip to content

Commit

Permalink
Merge branch 'main' into daily-js-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Daily Autobot committed Apr 12, 2023
2 parents 5ff2ee4 + 2c679ea commit 7f7f7f0
Show file tree
Hide file tree
Showing 10 changed files with 17,962 additions and 32,397 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,11 @@ Please check our [our documentation site](https://docs.daily.co/) to get started

# ⚠ Upcoming changes that may require action

## Turning off the camera will turn off the indicator light by default

Today, calls are by default configured to leave the camera indicator light on even after the camera has been turned off. Starting in 0.43.0, the default behavior will switch, so that turning off the camera turns off the indicator light. This is usually a much better experience for users and worth the tradeoff of slightly slower camera toggling.

To test the change that will be coming in 0.43.0, you can specify `dailyConfig: { experimentalChromeVideoMuteLightOff: true }`. Once the switch to the new default behavior happens, `experimentalChromeVideoMuteLightOff` won't be needed anymore and so will be deprecated.

For those who want to keep the current default behavior of leaving the indicator light on to speed up camera toggling, they can specify `dailyConfig: { keepCamIndicatorLightOn: true }`. This flag is available today.

## Duplicate call instances will not be allowed

Today we do not support multiple call objects to be instantiated and running simultaneously. Doing so causes a smorgasbord of issues, some more obvious than others. After detecting this to be a common issue in development we will be making this setup impossible. Starting in 0.43.0, two currently unsupported behaviors will now throw an `Error` instead of silently failing or simply logging the error. The constructor of a call will throw an `Error` if another one exists and has not been destroyed. And attempting to use a call instance that has been destroyed will throw an `Error`. To see if you are using multiple call objects or using a call after it has been detroyed, check your logs for `Dual call object instances detected`, `Duplicate call object instances detected`, or `You are attempting to use a call instance that was previously destroyed`.
Today we do not support multiple call objects to be instantiated and running simultaneously. Doing so causes a smorgasbord of issues, some more obvious than others. After detecting this to be a common issue in development we will be making this setup impossible. Starting in 0.45.0, two currently unsupported behaviors will now throw an `Error` instead of silently failing or simply logging the error. The constructor of a call will throw an `Error` if another one exists and has not been destroyed. And attempting to use a call instance that has been destroyed will throw an `Error`. To see if you are using multiple call objects or using a call after it has been detroyed, check your logs for `Dual call object instances detected`, `Duplicate call object instances detected`, or `You are attempting to use a call instance that was previously destroyed`.

If you think this will affect you, you can turn on the 0.43.0 behavior and have an `Error` thrown by passing adding `strictMode: true` to your iframe properties passed in at construction:
If you think this will affect you, you can turn on the 0.45.0 behavior and have an `Error` thrown by passing adding `strictMode: true` to your iframe properties passed in at construction:

```
try {
Expand Down
47 changes: 36 additions & 11 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export interface DailyCustomIntegration {
* - false won't share
* - 'owners' will share with owners only
* - string[] will share with participants with given list of session ids
*
*
* When the integration is started, it will be started for other participants, too.
* When it's stopped, it will stop for all participants.
*/
Expand Down Expand Up @@ -360,7 +360,6 @@ export interface DailyMicAudioModeSettings {
export interface DailyAdvancedConfig {
camSimulcastEncodings?: any[];
disableSimulcast?: boolean;
experimentalChromeVideoMuteLightOff?: boolean;
keepCamIndicatorLightOn?: boolean;
experimentalGetUserMediaConstraintsModify?: (
constraints: MediaStreamConstraints
Expand Down Expand Up @@ -734,20 +733,40 @@ export interface DailyInputSettings {
}

export interface DailyInputAudioSettings {
processor?: DailyInputAudioProcessorSettings;
processor: DailyInputAudioProcessorSettings;
}

export interface DailyInputAudioProcessorSettings {
type: 'none' | 'noise-cancellation';
}

export interface DailyNoInputSettings {
type: 'none';
}

export interface DailyBackgroundBlurInputSettings {
type: 'background-blur';
config: {
strength?: number;
};
}

export interface DailyBackgroundImageInputSettings {
type: 'background-image';
config: {
url?: string;
source?: string | number;
};
}

export type DailyInputVideoProcessorSettings =
| DailyNoInputSettings
| DailyBackgroundBlurInputSettings
| DailyBackgroundImageInputSettings;

export interface DailyInputVideoSettings {
processor?: DailyInputVideoProcessorSettings;
}
export interface DailyInputVideoProcessorSettings {
type: 'none' | 'background-blur' | 'background-image';
config?: {};
}

export interface DailyEventObjectNoPayload {
action: Extract<
Expand Down Expand Up @@ -829,21 +848,21 @@ export type DailyFatalError = {
};

export interface DailyFatalConnectionError extends DailyFatalError {
type: Extract<DailyFatalConnectionError, 'connection-error'>;
type: Extract<DailyFatalErrorType, 'connection-error'>;
details: {
on: 'join' | 'reconnect';
sourceError: Error;
uri?: string;
};
}

export type DailyFatalErrorObject<T extends DailyFatalError = any> =
export type DailyFatalErrorObject<T extends DailyFatalErrorType> =
T extends DailyFatalConnectionError['type'] ? DailyFatalConnectionError : any;

export interface DailyEventObjectFatalError {
action: Extract<DailyEvent, 'error'>;
errorMsg: string;
error?: DailyFatalErrorObject;
error?: DailyFatalErrorObject<DailyFatalErrorType>;
}

export interface DailyEventObjectNonFatalError {
Expand Down Expand Up @@ -1394,7 +1413,13 @@ export interface DailyTranscriptionDeepgramOptions {
redact?: Array<string> | boolean;
}

export type SidebarView = null | 'people' | 'chat' | 'network' | 'breakout' | string;
export type SidebarView =
| null
| 'people'
| 'chat'
| 'network'
| 'breakout'
| string;

export interface DailyCall {
iframe(): HTMLIFrameElement | null;
Expand Down
Loading

0 comments on commit 7f7f7f0

Please sign in to comment.