Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add demo URL option to confirm meeting end #38

Merged
merged 1 commit into from
Dec 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/browser/app/meeting/meeting.html
Original file line number Diff line number Diff line change
@@ -248,7 +248,7 @@ <h1 class="h3 mb-3 font-weight-normal text-center">Select devices</h1>
</button>
</div>
<div class="col-2 text-right">
<button id="button-meeting-leave" type="button" class="btn btn-outline-danger m-2 px-4" title="Leave meeting">
<button id="button-meeting-leave" type="button" class="btn btn-outline-success m-2 px-4" title="Leave meeting">
${require('../../node_modules/open-iconic/svg/account-logout.svg').default}
</button>
<button id="button-meeting-end" type="button" class="btn btn-outline-danger m-2 px-4" title="End meeting">
5 changes: 5 additions & 0 deletions demos/browser/app/meeting/meeting.ts
Original file line number Diff line number Diff line change
@@ -351,6 +351,11 @@ export class DemoMeetingApp implements AudioVideoObserver, DeviceChangeObserver

const buttonMeetingEnd = document.getElementById('button-meeting-end');
buttonMeetingEnd.addEventListener('click', _e => {
const confirmEnd = (new URL(window.location.href).searchParams.get('confirm-end')) === 'true';
const prompt = 'Are you sure you want to end the meeting for everyone? The meeting cannot be used after ending it.';
if (confirmEnd && !window.confirm(prompt)) {
return;
}
new AsyncScheduler().start(async () => {
(buttonMeetingEnd as HTMLButtonElement).disabled = true;
await this.endMeeting();