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

feature-9065: Track when attendees login and join an event virtually … #9138

Merged
merged 2 commits into from Sep 12, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions app/components/public/stream/join-video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default class JoinVideo extends Component<Args> {
openPanel(): void {
if (this.args.canAccess) {
this.args.showSidePanel?.();
this.eventCheckIn(this.args.event.identifier)
this.router.transitionTo({ queryParams: { side_panel: true } });
} else {
if (this.session.isAuthenticated) {
Expand All @@ -35,4 +36,16 @@ export default class JoinVideo extends Component<Args> {
}
}
}

async eventCheckIn(event_identifier: string) {
try {
const data:any = {
'check_in_type' : 'event',
'is_check_in' : true
};
await this.loader.post(`events/${event_identifier}/virtual/check-in`, data);
} catch (e) {
// Ignore error to prevent stackoverflow
}
}
}
17 changes: 17 additions & 0 deletions app/components/public/stream/video-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,28 @@ export default class PublicStreamVideoStream extends Component<Args> {
this.selectingLanguage.setName(null);
}
this.selectingLanguage.setTranslationRoomId(stream.id)
this.eventCheckIn(this.args.event.identifier, stream.microlocationId)
}

@action
hideStreamYard() {
this.selectingLanguage.setStreamYardVisibility(false);
}

async eventCheckIn(event_identifier: string, microlocation_id: number) {
try {
const data:any = {
'check_in_type' : 'room',
microlocation_id,
'is_check_in' : true
};
if (microlocation_id === undefined) {
data.check_in_type = 'virtual-room'
}
await this.loader.post(`events/${event_identifier}/virtual/check-in`, data);
} catch (e) {
// Ignore error to prevent stackoverflow
}
}

}