forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
937 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
react/features/base/devices/actions.ts → react/features/base/devices/actions.web.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { IReduxState } from '../../app/types'; | ||
|
||
/** | ||
* Returns true if there are devices of a specific type or on native platform. | ||
* | ||
* @param {Object} state - The state of the application. | ||
* @param {string} type - The type of device: VideoOutput | audioOutput | audioInput. | ||
* | ||
* @returns {boolean} | ||
*/ | ||
export function hasAvailableDevices(state: IReduxState, type: string) { | ||
if (state['features/base/devices'] === undefined) { | ||
return true; | ||
} | ||
|
||
const availableDevices = state['features/base/devices'].availableDevices; | ||
|
||
return Number(availableDevices[type as keyof typeof availableDevices]?.length) > 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './functions.any'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* eslint-disable lines-around-comment */ | ||
|
||
export interface IDevicesState { | ||
availableDevices: { | ||
// @ts-ignore | ||
audioInput?: MediaDeviceInfo[]; | ||
// @ts-ignore | ||
audioOutput?: MediaDeviceInfo[]; | ||
// @ts-ignore | ||
videoInput?: MediaDeviceInfo[]; | ||
}; | ||
pendingRequests: any[]; | ||
permissions: { | ||
audio: boolean; | ||
video: boolean; | ||
}; | ||
} |
10 changes: 10 additions & 0 deletions
10
react/features/base/environment/checkChromeExtensionsInstalled.native.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Checks whether the chrome extensions defined in the config file are installed or not. | ||
* | ||
* @param {Object} _config - Objects containing info about the configured extensions. | ||
* | ||
* @returns {Promise[]} | ||
*/ | ||
export default function checkChromeExtensionsInstalled(_config: any = {}) { | ||
return Promise.resolve([]); | ||
} |
26 changes: 26 additions & 0 deletions
26
react/features/base/environment/checkChromeExtensionsInstalled.web.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Checks whether the chrome extensions defined in the config file are installed or not. | ||
* | ||
* @param {Object} config - Objects containing info about the configured extensions. | ||
* | ||
* @returns {Promise[]} | ||
*/ | ||
export default function checkChromeExtensionsInstalled(config: any = {}) { | ||
const isExtensionInstalled = (info: any) => new Promise(resolve => { | ||
const img = new Image(); | ||
|
||
img.src = `chrome-extension://${info.id}/${info.path}`; | ||
img.setAttribute('aria-hidden', 'true'); | ||
img.onload = function() { | ||
resolve(true); | ||
}; | ||
img.onerror = function() { | ||
resolve(false); | ||
}; | ||
}); | ||
const extensionInstalledFunction = (info: any) => isExtensionInstalled(info); | ||
|
||
return Promise.all( | ||
(config.chromeExtensionsInfo || []).map((info: any) => extensionInstalledFunction(info)) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.