Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions packages/audio-filters-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
"outDir": "./dist",
"module": "ES2020",
"target": "ES2020",
"lib": [
"esnext",
"dom"
],
"lib": ["esnext", "dom"],
"allowJs": true,
"declaration": true,
"moduleResolution": "node",
"verbatimModuleSyntax": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"resolveJsonModule": true,
Expand All @@ -21,8 +19,5 @@
"inlineSources": true
},
"exclude": ["**/__tests__/**"],
"include": [
"./src",
"index.ts"
]
"include": ["./src", "index.ts"]
}
18 changes: 9 additions & 9 deletions packages/client/src/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import type {
UpdateUserPermissionsResponse,
} from './gen/coordinator';
import { OwnCapability } from './gen/coordinator';
import {
import type {
AudioTrackType,
CallConstructor,
CallLeaveOptions,
Expand All @@ -123,7 +123,7 @@ import {
createStatsReporter,
getSdkSignature,
SfuStatsReporter,
StatsReporter,
type StatsReporter,
Tracer,
} from './stats';
import { DynascaleManager } from './helpers/DynascaleManager';
Expand All @@ -132,12 +132,12 @@ import { CallTypes } from './CallType';
import { StreamClient } from './coordinator/connection/client';
import { retryInterval, sleep } from './coordinator/connection/utils';
import {
AllCallEvents,
CallEventListener,
type AllCallEvents,
type CallEventListener,
ErrorFromResponse,
Logger,
RejectReason,
StreamCallEvent,
type Logger,
type RejectReason,
type StreamCallEvent,
} from './coordinator/connection/types';
import { getClientDetails } from './helpers/client-details';
import { getLogger } from './logger';
Expand All @@ -152,10 +152,10 @@ import { ensureExhausted } from './helpers/ensureExhausted';
import { pushToIfMissing } from './helpers/array';
import {
makeSafePromise,
PromiseWithResolvers,
type PromiseWithResolvers,
promiseWithResolvers,
} from './helpers/promise';
import { GetCallStatsResponse } from './gen/shims';
import type { GetCallStatsResponse } from './gen/shims';

/**
* An object representation of a `Call`.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/CallType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StreamVideoParticipant } from './types';
import type { StreamVideoParticipant } from './types';
import {
Comparator,
type Comparator,
defaultSortPreset,
livestreamOrAudioRoomSortPreset,
} from './sorting';
Expand Down
12 changes: 6 additions & 6 deletions packages/client/src/StreamSfuClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
createWebSocketSignalChannel,
Dispatcher,
IceTrickleBuffer,
SfuEventKinds,
type SfuEventKinds,
} from './rtc';
import {
JoinRequest,
Expand All @@ -28,17 +28,17 @@ import {
import { ICETrickle } from './gen/video/sfu/models/models';
import { StreamClient } from './coordinator/connection/client';
import { generateUUIDv4 } from './coordinator/connection/utils';
import { Credentials } from './gen/coordinator';
import { Logger } from './coordinator/connection/types';
import type { Credentials } from './gen/coordinator';
import type { Logger } from './coordinator/connection/types';
import { getLogger, getLogLevel } from './logger';
import {
makeSafePromise,
PromiseWithResolvers,
type PromiseWithResolvers,
promiseWithResolvers,
SafePromise,
type SafePromise,
} from './helpers/promise';
import { getTimers } from './timers';
import { Tracer, TraceSlice } from './stats';
import { Tracer, type TraceSlice } from './stats';

export type StreamSfuClientConstructor = {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/StreamVideoClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
QueryCallStatsRequest,
QueryCallStatsResponse,
} from './gen/coordinator';
import {
import type {
AllClientEvents,
ClientEventListener,
Logger,
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/__tests__/clientTestUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AllClientEvents } from '../coordinator/connection/types';
import type { AllClientEvents } from '../coordinator/connection/types';
import { StreamVideoClient } from '../StreamVideoClient';
import { Call } from '../Call';
import { RxUtils } from '../store';
Expand Down
32 changes: 16 additions & 16 deletions packages/client/src/coordinator/connection/client.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axios, {
AxiosError,
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
type AxiosInstance,
type AxiosRequestConfig,
type AxiosResponse,
} from 'axios';
import https from 'https';
import { StableWSConnection } from './connection';
Expand All @@ -17,22 +17,22 @@ import {
retryInterval,
sleep,
} from './utils';
import {
AllClientEvents,
AllClientEventTypes,
APIErrorResponse,
ClientEventListener,
ConnectAPIResponse,
import {
type AllClientEvents,
type AllClientEventTypes,
type APIErrorResponse,
type ClientEventListener,
type ConnectAPIResponse,
ErrorFromResponse,
Logger,
StreamClientOptions,
StreamVideoEvent,
TokenOrProvider,
User,
UserWithId,
type Logger,
type StreamClientOptions,
type StreamVideoEvent,
type TokenOrProvider,
type User,
type UserWithId,
} from './types';
import { getLocationHint } from './location';
import {
import type {
ConnectedEvent,
CreateGuestRequest,
CreateGuestResponse,
Expand Down
10 changes: 7 additions & 3 deletions packages/client/src/coordinator/connection/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { AxiosRequestConfig, AxiosResponse } from 'axios';
import { ConnectedEvent, UserRequest, VideoEvent } from '../../gen/coordinator';
import { AllSfuEvents } from '../../rtc';
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
import type {
ConnectedEvent,
UserRequest,
VideoEvent,
} from '../../gen/coordinator';
import type { AllSfuEvents } from '../../rtc';

export type UR = Record<string, unknown>;

Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/devices/CameraManager.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Observable } from 'rxjs';
import { Call } from '../Call';
import { CameraDirection, CameraManagerState } from './CameraManagerState';
import { type CameraDirection, CameraManagerState } from './CameraManagerState';
import { InputMediaDeviceManager } from './InputMediaDeviceManager';
import { getVideoDevices, getVideoStream } from './devices';
import { OwnCapability, VideoSettingsResponse } from '../gen/coordinator';
import { OwnCapability, type VideoSettingsResponse } from '../gen/coordinator';
import { TrackType } from '../gen/video/sfu/models/models';
import { isMobile } from '../helpers/compatibility';
import { isReactNative } from '../helpers/platforms';
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/devices/InputMediaDeviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createSubscription } from '../store/rxUtils';
import { InputMediaDeviceManagerState } from './InputMediaDeviceManagerState';
import { isMobile } from '../helpers/compatibility';
import { isReactNative } from '../helpers/platforms';
import { Logger } from '../coordinator/connection/types';
import type { Logger } from '../coordinator/connection/types';
import { getLogger } from '../logger';
import { TrackType } from '../gen/video/sfu/models/models';
import { deviceIds$ } from './devices';
Expand All @@ -14,7 +14,7 @@ import {
withCancellation,
withoutConcurrency,
} from '../helpers/concurrency';
import {
import type {
MediaStreamFilter,
MediaStreamFilterEntry,
MediaStreamFilterRegistrationResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
shareReplay,
} from 'rxjs';
import { RxUtils } from '../store';
import { BrowserPermission, BrowserPermissionState } from './BrowserPermission';
import { BrowserPermission, type BrowserPermissionState } from './BrowserPermission';

export type InputDeviceStatus = 'enabled' | 'disabled' | undefined;
export type TrackDisableMode = 'stop-tracks' | 'disable-tracks';
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/devices/MicrophoneManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import type { INoiseCancellation } from '@stream-io/audio-filters-web';
import { Call } from '../Call';
import { InputMediaDeviceManager } from './InputMediaDeviceManager';
import { MicrophoneManagerState } from './MicrophoneManagerState';
import { TrackDisableMode } from './InputMediaDeviceManagerState';
import type { TrackDisableMode } from './InputMediaDeviceManagerState';
import { getAudioDevices, getAudioStream } from './devices';
import { TrackType } from '../gen/video/sfu/models/models';
import { createSoundDetector } from '../helpers/sound-detector';
import { isReactNative } from '../helpers/platforms';
import {
AudioSettingsResponse,
type AudioSettingsResponse,
NoiseCancellationSettingsModeEnum,
OwnCapability,
} from '../gen/coordinator';
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/devices/MicrophoneManagerState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BehaviorSubject, distinctUntilChanged, Observable } from 'rxjs';
import { RxUtils } from '../store';
import {
InputMediaDeviceManagerState,
TrackDisableMode,
type TrackDisableMode,
} from './InputMediaDeviceManagerState';
import { getAudioBrowserPermission, resolveDeviceId } from './devices';

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/devices/ScreenShareManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ScreenShareState } from './ScreenShareState';
import { Call } from '../Call';
import { TrackType } from '../gen/video/sfu/models/models';
import { getScreenShareStream } from './devices';
import { ScreenShareSettings } from '../types';
import type { ScreenShareSettings } from '../types';
import { createSubscription } from '../store/rxUtils';

export class ScreenShareManager extends InputMediaDeviceManager<
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/devices/ScreenShareState.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BehaviorSubject, distinctUntilChanged } from 'rxjs';
import { InputMediaDeviceManagerState } from './InputMediaDeviceManagerState';
import { ScreenShareSettings } from '../types';
import type { ScreenShareSettings } from '../types';
import { RxUtils } from '../store';

export class ScreenShareState extends InputMediaDeviceManagerState<DisplayMediaStreamOptions> {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/events/call.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CallingState } from '../store';
import { Call } from '../Call';
import {
CallAcceptedEvent,
CallRejectedEvent,
type CallAcceptedEvent,
type CallRejectedEvent,
OwnCapability,
} from '../gen/coordinator';
import { CallEnded } from '../gen/video/sfu/event/events';
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/events/callEventHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
watchTrackPublished,
watchTrackUnpublished,
} from '../events';
import {
import type {
AllCallEvents,
AllClientCallEvents,
CallEventListener,
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/events/internal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Dispatcher } from '../rtc';
import { Call } from '../Call';
import { CallState } from '../store';
import { StreamVideoParticipantPatches } from '../types';
import type { StreamVideoParticipantPatches } from '../types';
import { getLogger } from '../logger';
import { pushToIfMissing, removeFromIfPresent } from '../helpers/array';
import type {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/events/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type {
} from '../gen/video/sfu/event/events';
import type { Participant } from '../gen/video/sfu/models/models';
import {
StreamVideoParticipant,
StreamVideoParticipantPatch,
type StreamVideoParticipant,
type StreamVideoParticipantPatch,
VisibilityState,
} from '../types';
import { CallState } from '../store';
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/events/speaker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Dispatcher } from '../rtc';
import { CallState } from '../store';
import { StreamVideoParticipantPatches } from '../types';
import type { StreamVideoParticipantPatches } from '../types';

/**
* Watches for `dominantSpeakerChanged` events.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/helpers/DynascaleManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
AudioTrackType,
type AudioTrackType,
DebounceType,
VideoTrackType,
type VideoTrackType,
VisibilityState,
} from '../types';
import { TrackType, VideoDimension } from '../gen/video/sfu/models/models';
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/helpers/RNSpeechDetector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseStats } from '../stats';
import { SoundStateChangeHandler } from './sound-detector';
import type { BaseStats } from '../stats';
import type { SoundStateChangeHandler } from './sound-detector';
import { flatten } from '../stats/utils';
import { getLogger } from '../logger';

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/helpers/__tests__/clientUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getCallInitConcurrencyTag,
getInstanceKey,
} from '../clientUtils';
import { TokenProvider } from '../../coordinator/connection/types';
import type { TokenProvider } from '../../coordinator/cownnection/types';
import { getSdkInfo, setSdkInfo } from '../client-details';

describe('clientUtils', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/helpers/participantUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StreamVideoParticipant, VideoTrackType } from '../types';
import type { StreamVideoParticipant, VideoTrackType } from '../types';
import { TrackType } from '../gen/video/sfu/models/models';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger, LogLevel } from './coordinator/connection/types';
import type { Logger, LogLevel } from './coordinator/connection/types';
import { isReactNative } from './helpers/platforms';

// log levels, sorted by verbosity
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/permissions/PermissionsContext.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CallSettingsResponse, OwnCapability } from '../gen/coordinator';
import { type CallSettingsResponse, OwnCapability } from '../gen/coordinator';
import { TrackType } from '../gen/video/sfu/models/models';
import { ensureExhausted } from '../helpers/ensureExhausted';

Expand Down
12 changes: 6 additions & 6 deletions packages/client/src/rpc/createClient.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import {
MethodInfo,
NextUnaryFn,
RpcInterceptor,
RpcOptions,
type MethodInfo,
type NextUnaryFn,
type RpcInterceptor,
type RpcOptions,
UnaryCall,
} from '@protobuf-ts/runtime-rpc';
import {
TwirpFetchTransport,
TwirpOptions,
type TwirpOptions,
} from '@protobuf-ts/twirp-transport';
import { SignalServerClient } from '../gen/video/sfu/signal_rpc/signal.client';
import { Logger, LogLevel } from '../coordinator/connection/types';
import type { Logger, LogLevel } from '../coordinator/connection/types';
import type { Trace } from '../stats';
import type { SfuResponseWithError } from './retryable';

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/rpc/retryable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
FinishedUnaryCall,
type FinishedUnaryCall,
RpcError,
UnaryCall,
} from '@protobuf-ts/runtime-rpc';
Expand Down
Loading