Skip to content

Commit

Permalink
ref(tracks) Remove gUM option that is no longer supported
Browse files Browse the repository at this point in the history
  • Loading branch information
jallamsetty1 committed Dec 17, 2024
1 parent aabc50d commit c9add0a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 23 deletions.
6 changes: 2 additions & 4 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,7 @@ export default {
const timeout = browser.isElectron() ? 15000 : 60000;
const audioOptions = {
devices: [ MEDIA_TYPE.AUDIO ],
timeout,
firePermissionPromptIsShownEvent: true
timeout
};

// Spot uses the _desktopSharingSourceDevice config option to use an external video input device label as
Expand Down Expand Up @@ -478,8 +477,7 @@ export default {
} else if (requestedAudio || requestedVideo) {
tryCreateLocalTracks = APP.store.dispatch(createInitialAVTracks({
devices: initialDevices,
timeout,
firePermissionPromptIsShownEvent: true
timeout
}, recordTimeMetrics)).then(({ tracks, errors: pErrors }) => {
Object.assign(errors, pErrors);

Expand Down
9 changes: 3 additions & 6 deletions react/features/base/tracks/actions.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@ export function createInitialAVTracks(options: ICreateInitialTracksOptions, reco
return (dispatch: IStore['dispatch'], _getState: IStore['getState']) => {
const {
devices,
timeout,
firePermissionPromptIsShownEvent
timeout
} = options;

dispatch(gumPending(devices, IGUMPendingState.PENDING_UNMUTE));
Expand Down Expand Up @@ -400,16 +399,14 @@ export function createInitialAVTracks(options: ICreateInitialTracksOptions, reco
if (devices.includes(MEDIA_TYPE.AUDIO)) {
gUMPromises.push(createLocalTracksF({
devices: [ MEDIA_TYPE.AUDIO ],
timeout,
firePermissionPromptIsShownEvent
timeout
}));
}

if (devices.includes(MEDIA_TYPE.VIDEO)) {
gUMPromises.push(createLocalTracksF({
devices: [ MEDIA_TYPE.VIDEO ],
timeout,
firePermissionPromptIsShownEvent
timeout
}));
}

Expand Down
3 changes: 0 additions & 3 deletions react/features/base/tracks/functions.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export * from './functions.any';
* @param {string|null} [options.micDeviceId] - Microphone device id or
* {@code undefined} to use app's settings.
* @param {number|undefined} [oprions.timeout] - A timeout for JitsiMeetJS.createLocalTracks used to create the tracks.
* @param {boolean} [options.firePermissionPromptIsShownEvent] - Whether lib-jitsi-meet
* should check for a {@code getUserMedia} permission prompt and fire a
* corresponding event.
* @param {IStore} store - The redux store in the context of which the function
* is to execute and from which state such as {@code config} is to be retrieved.
* @returns {Promise<JitsiLocalTrack[]>}
Expand Down
8 changes: 0 additions & 8 deletions react/features/base/tracks/functions.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ export * from './functions.any';
* @param {string|null} [options.micDeviceId] - Microphone device id or
* {@code undefined} to use app's settings.
* @param {number|undefined} [oprions.timeout] - A timeout for JitsiMeetJS.createLocalTracks used to create the tracks.
* @param {boolean} [options.firePermissionPromptIsShownEvent] - Whether lib-jitsi-meet
* should check for a {@code getUserMedia} permission prompt and fire a
* corresponding event.
* @param {IStore} store - The redux store in the context of which the function
* is to execute and from which state such as {@code config} is to be retrieved.
* @param {boolean} recordTimeMetrics - If true time metrics will be recorded.
Expand All @@ -45,7 +42,6 @@ export function createLocalTracksF(options: ITrackOptions = {}, store?: IStore,
const {
desktopSharingSourceDevice,
desktopSharingSources,
firePermissionPromptIsShownEvent,
timeout
} = options;

Expand Down Expand Up @@ -91,7 +87,6 @@ export function createLocalTracksF(options: ITrackOptions = {}, store?: IStore,
effects,
facingMode: options.facingMode || getCameraFacingMode(state),
firefox_fake_device, // eslint-disable-line camelcase
firePermissionPromptIsShownEvent,
micDeviceId,
resolution,
timeout
Expand Down Expand Up @@ -146,7 +141,6 @@ export function createPrejoinTracks() {
if (requestedAudio || requestedVideo) {
tryCreateLocalTracks = createLocalTracksF({
devices: initialDevices,
firePermissionPromptIsShownEvent: true,
timeout
}, APP.store)
.catch(async (err: Error) => {
Expand All @@ -163,15 +157,13 @@ export function createPrejoinTracks() {
if (requestedAudio) {
gUMPromises.push(createLocalTracksF({
devices: [ MEDIA_TYPE.AUDIO ],
firePermissionPromptIsShownEvent: true,
timeout
}));
}

if (requestedVideo) {
gUMPromises.push(createLocalTracksF({
devices: [ MEDIA_TYPE.VIDEO ],
firePermissionPromptIsShownEvent: true,
timeout
}));
}
Expand Down
2 changes: 0 additions & 2 deletions react/features/base/tracks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export interface ITrackOptions {
desktopSharingSources?: string[];
devices?: string[];
facingMode?: string;
firePermissionPromptIsShownEvent?: boolean;
micDeviceId?: string | null;
timeout?: number;
}
Expand Down Expand Up @@ -76,7 +75,6 @@ export interface IShareOptions {

export interface ICreateInitialTracksOptions {
devices: Array<MediaType>;
firePermissionPromptIsShownEvent?: boolean;
timeout?: number;
}

Expand Down

0 comments on commit c9add0a

Please sign in to comment.