Skip to content

Commit

Permalink
Remove virtual bells
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwink0 committed Aug 20, 2021
1 parent 3c8f825 commit 8195298
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,7 @@
</v-list-item>
</v-list>
<v-divider></v-divider>
<v-list>
<v-list-item>
<v-list-item-content>Enable virtual bells</v-list-item-content>
<v-list-item-action>
<v-switch v-model="settings.enableBells" color="accent" :inset="features.ios"></v-switch>
</v-list-item-action>
</v-list-item>
</v-list>
<v-divider></v-divider>
<v-list>
<v-list-item>
<v-list-item-content>
<v-list-item-title>Enable notifications</v-list-item-title>
<v-list-item-subtitle v-if="features.notif">Get notified at the start of each Zoom class</v-list-item-subtitle>
<v-list-item-subtitle v-else>Not supported in this browser</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-switch v-model="settings.enableNotifications" color="accent" :disabled="!features.notif" :inset="features.ios"></v-switch>
</v-list-item-action>
</v-list-item>
</v-list>
<v-divider></v-divider>
<v-list>
<v-list-item>
Expand Down Expand Up @@ -493,21 +473,6 @@ export default {
const startTone = new Audio("/tones/start.mp3");
const endTone = new Audio("/tones/end.mp3");
startTone.volume = endTone.volume = 0.7;
this.socket.on("virtual bell", (isStartBell, periodName) => {
if (this.settings.enableBells)
isStartBell ? startTone.play() : endTone.play();
if (isStartBell && this.settings.enableNotifications && this.settings.links[periodName]) {
const notif = new Notification(periodName+" is starting", {
body: "Click to join this class!",
icon: "/img/icons/android-chrome-192x192.png",
});
notif.addEventListener("click", () => {
window.open(this.settings.links[periodName]);
notif.close();
});
}
this.socket.emit("virtual bell ack", this.settings.enableBells, this.settings.enableNotifications);
});
this.socket.on("pong", () => {
let now = new Date();
this.io.lastConnected = now;
Expand Down

0 comments on commit 8195298

Please sign in to comment.