don't reload sound file each notification
This commit is contained in:
parent
eab60d4449
commit
7414539f09
|
@ -22,6 +22,8 @@ export class UserNotificationService {
|
|||
private mentionsSinceIds: { [id: string]: string } = {};
|
||||
private notificationsSinceIds: { [id: string]: string } = {};
|
||||
|
||||
private sound: Howl;
|
||||
|
||||
constructor(
|
||||
private readonly streamingService: StreamingService,
|
||||
private readonly toolsService: ToolsService,
|
||||
|
@ -31,10 +33,20 @@ export class UserNotificationService {
|
|||
|
||||
this.fetchNotifications();
|
||||
|
||||
this.playSoundNotification();
|
||||
// this.playSoundNotification();
|
||||
}
|
||||
|
||||
private fetchNotifications() {
|
||||
this.sound = new Howl({
|
||||
// src: ['assets/audio/exquisite.mp3']
|
||||
//src: ['assets/audio/all-eyes-on-me.mp3']
|
||||
//src: ['assets/audio/appointed.mp3']
|
||||
src: ['assets/audio/boop.mp3']
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
let accounts = this.store.snapshot().registeredaccounts.accounts;
|
||||
// let promises: Promise<any>[] = [];
|
||||
|
||||
|
@ -106,13 +118,7 @@ export class UserNotificationService {
|
|||
// audio.load();
|
||||
// audio.play();
|
||||
|
||||
var sound = new Howl({
|
||||
// src: ['assets/audio/exquisite.mp3']
|
||||
src: ['assets/audio/all-eyes-on-me.mp3']
|
||||
//src: ['assets/audio/appointed.mp3']
|
||||
});
|
||||
|
||||
sound.play();
|
||||
this.sound.play();
|
||||
}
|
||||
|
||||
private processNewUpdate(account: AccountInfo, notification: StatusUpdate) {
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue