Skip to content

Commit

Permalink
chore: remove dangling preferredVideoCodec option (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlaz authored Sep 12, 2023
1 parent 3c83e99 commit 7ab3125
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/client/src/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,6 @@ export class Call {
connectionConfig,
isDtxEnabled,
isRedEnabled,
preferredVideoCodec: this.streamClient.options.preferredVideoCodec,
});
}

Expand Down
4 changes: 0 additions & 4 deletions packages/client/src/coordinator/connection/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ export type StreamClientOptions = Partial<AxiosRequestConfig> & {
// Set the instance of StableWSConnection on chat client. Its purely for testing purpose and should
// not be used in production apps.
wsConnection?: StableWSConnection;
/**
* The preferred video codec to use.
*/
preferredVideoCodec?: string;
};

export type TokenProvider = () => Promise<string>;
Expand Down
9 changes: 2 additions & 7 deletions packages/client/src/rtc/Publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ import { getOSInfo } from '../client-details';

const logger: Logger = getLogger(['Publisher']);

export type PublisherOpts = {
export type PublisherConstructorOpts = {
sfuClient: StreamSfuClient;
state: CallState;
dispatcher: Dispatcher;
connectionConfig?: RTCConfiguration;
isDtxEnabled: boolean;
isRedEnabled: boolean;
preferredVideoCodec?: string;
iceRestartDelay?: number;
};

Expand Down Expand Up @@ -97,7 +96,6 @@ export class Publisher {

private readonly isDtxEnabled: boolean;
private readonly isRedEnabled: boolean;
private readonly preferredVideoCodec?: string;

private readonly unsubscribeOnIceRestart: () => void;

Expand All @@ -118,7 +116,6 @@ export class Publisher {
* @param dispatcher the dispatcher to use.
* @param isDtxEnabled whether DTX is enabled.
* @param isRedEnabled whether RED is enabled.
* @param preferredVideoCodec the preferred video codec.
* @param iceRestartDelay the delay in milliseconds to wait before restarting ICE once connection goes to `disconnected` state.
*/
constructor({
Expand All @@ -128,15 +125,13 @@ export class Publisher {
state,
isDtxEnabled,
isRedEnabled,
preferredVideoCodec,
iceRestartDelay = 2500,
}: PublisherOpts) {
}: PublisherConstructorOpts) {
this.pc = this.createPeerConnection(connectionConfig);
this.sfuClient = sfuClient;
this.state = state;
this.isDtxEnabled = isDtxEnabled;
this.isRedEnabled = isRedEnabled;
this.preferredVideoCodec = preferredVideoCodec;
this.iceRestartDelay = iceRestartDelay;

this.unsubscribeOnIceRestart = dispatcher.on(
Expand Down

0 comments on commit 7ab3125

Please sign in to comment.