v1.5.2/fullscreen support

This commit is contained in:
2020-07-25 22:15:03 -04:00
parent 960d2af748
commit 7c61486542
8 changed files with 77 additions and 11 deletions
+11 -1
View File
@@ -32,7 +32,6 @@ import Chat from './Chat';
import {
ChevronRight,
InfoRounded,
ContactSupportRounded,
MonetizationOnRounded,
RateReviewRounded,
} from '@material-ui/icons';
@@ -56,6 +55,15 @@ export default class Create extends Component {
this.joinCall = this.joinCall.bind(this);
this.success = this.success.bind(this);
}
componentDidMount() {
const { lastActive, userName, partyName, partyPin } = LocalData();
if (Math.abs(new Date(parseInt(lastActive)) - new Date().getTime()) <= 60000) {
if (userName && partyName && partyPin) {
this.props.updateLoading(true);
this.joinCall(userName, partyName, partyPin);
}
}
}
partyNameChange(value) {
if (value.length <= CONSTANTS.NAME_LENGTH) this.setState({ name: value });
}
@@ -102,6 +110,7 @@ export default class Create extends Component {
}
createCall(userName, partyName, partyPin) {
this.props.updateLoading(true);
getUserUid();
const apidata = {
userName,
partyName,
@@ -136,6 +145,7 @@ export default class Create extends Component {
partyPin,
source: getPlayerSource(),
};
getUserUid();
JoinRoomApi(apidata)
.then((res) => res.json())
.then((joinResult) => {