diff --git a/app/public/background.js b/app/public/background.js
index 340ad82..ff6f87a 100644
--- a/app/public/background.js
+++ b/app/public/background.js
@@ -123,6 +123,7 @@ const updateActiveParties = (partyName, doDelete = false) => {
};
const waitAndLeaveParty = (partyName) => {
+ updateActiveParties(partyName);
setTimeout(() => updateActiveParties(partyName, true), 90000);
};
diff --git a/app/src/Api.js b/app/src/Api.js
index 7cdf823..e91fc02 100644
--- a/app/src/Api.js
+++ b/app/src/Api.js
@@ -14,7 +14,7 @@ COPIED, EDITED, OR REPRODUCED WITHOUT PERMISSION.
let CHROME_OR_BROWSER = chrome || browser;
-const API_HOST = 'http://localhost:5001/watch-party-crx/us-central1/widgets';
+const API_HOST = 'https://api.chromewatchparty.com';
export const PLAYER_STATUS = {
PLAYING: 'PLAYING',
diff --git a/app/src/Chat.js b/app/src/Chat.js
index 7745af4..fe09cf5 100644
--- a/app/src/Chat.js
+++ b/app/src/Chat.js
@@ -31,6 +31,10 @@ import {
Chip,
CircularProgress,
Paper,
+ Select,
+ MenuItem,
+ FormControl,
+ InputLabel,
} from '@material-ui/core';
import Thread from './Thread';
import {
@@ -74,6 +78,7 @@ import { goTo } from 'route-lite';
import CallManager from './CallManager';
import VideoListener from './VideoListener';
import ReactGiphySearchbox from 'react-giphy-searchbox';
+import VoxeetSDK from '@voxeet/voxeet-web-sdk';
let CHROME_OR_BROWSER = chrome || browser;
@@ -103,6 +108,12 @@ export default class Chat extends Component {
replyTo: null,
sendingMessages: [],
usingVideo: false,
+ audioInputs: [],
+ selectedAudioInput: '',
+ audioOutputs: [],
+ selectedAudioOutput: '',
+ videoInputs: [],
+ selectedVideoInput: '',
};
this.port = null;
this.gifClick = this.gifClick.bind(this);
@@ -245,6 +256,26 @@ export default class Chat extends Component {
}
callEventListener(event) {
this.setState(event);
+ if (event.onCall === true) {
+ VoxeetSDK.mediaDevice.enumerateAudioDevices('input').then((devices) => {
+ this.setState({
+ audioInputs: devices,
+ selectedAudioInput: devices.length > 0 ? devices[0].deviceId : '',
+ });
+ });
+ VoxeetSDK.mediaDevice.enumerateAudioDevices('output').then((devices) => {
+ this.setState({
+ audioOutputs: devices,
+ selectedAudioOutput: devices.length > 0 ? devices[0].deviceId : '',
+ });
+ });
+ VoxeetSDK.mediaDevice.enumerateVideoDevices('output').then((devices) => {
+ this.setState({
+ videoInputs: devices,
+ selectedVideoInput: devices.length > 0 ? devices[0].deviceId : '',
+ });
+ });
+ }
}
syncPlayer(video) {
const { status, showName, time, source, element, showChanged } = video;
@@ -519,6 +550,12 @@ export default class Chat extends Component {
replyTo,
sendingMessages,
usingVideo,
+ audioInputs,
+ selectedAudioInput,
+ audioOutputs,
+ selectedAudioOutput,
+ videoInputs,
+ selectedVideoInput,
} = this.state;
const { status } = this.props;
const { callEnabled } = status;
@@ -706,6 +743,78 @@ export default class Chat extends Component {