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 { ))} + {onCall && ( + + DEVICE SELECT + + )} + {onCall && ( +
+ + + Mic + + + + + + + Speaker + + + + + + + Camera + + + +
+ )} {player ? ( diff --git a/app/src/index.css b/app/src/index.css index 3517b75..c613fff 100644 --- a/app/src/index.css +++ b/app/src/index.css @@ -1055,6 +1055,21 @@ button.giphy-list-item { } .vxt-video-container { + position: fixed; + overflow-x: hidden; + overflow-y: auto; + top: 10px; + right: 10px; + max-height: 100%; + max-width: 425px; + width: 425px; + opacity: 0.8; + transition: all ease-in-out 0.3s; +} + +body.visible .vxt-video-container { + position: relative; + opacity: 1; display: block; overflow-x: hidden; overflow-y: auto; @@ -1140,3 +1155,21 @@ button.giphy-list-item { bottom: 34px; opacity: 1; } + +.MuiPopover-root[role='presentation'] { + z-index: 9999 !important; +} + +.vxt-device-selector > .MuiFormControl-root { + width: 100% !important; + margin: 5px 0; +} + +.vxt-device-selector label { + font-size: 15px !important; + left: 10px; + top: -9px; + background: #424242; + padding: 5px; + z-index: 9; +}