File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1818</ head >
1919< body id ="appBody ">
2020 < div id ="root "> </ div >
21+ < audio id ="notificationSound ">
22+ < source src ="./sound/notification.ogg " type ="audio/ogg " />
23+ </ audio >
24+ < audio id ="inviteSound ">
25+ < source src ="./sound/invite.ogg " type ="audio/ogg " />
26+ </ audio >
2127</ body >
2228</ html >
Original file line number Diff line number Diff line change @@ -6,9 +6,6 @@ import cons from './cons';
66import navigation from './navigation' ;
77import settings from './settings' ;
88
9- import NotificationSound from '../../../public/sound/notification.ogg' ;
10- import InviteSound from '../../../public/sound/invite.ogg' ;
11-
129function isNotifEvent ( mEvent ) {
1310 const eType = mEvent . getType ( ) ;
1411 if ( ! cons . supportEventTypes . includes ( eType ) ) return false ;
@@ -238,14 +235,14 @@ class Notifications extends EventEmitter {
238235
239236 _playNotiSound ( ) {
240237 if ( ! this . _notiAudio ) {
241- this . _notiAudio = new Audio ( NotificationSound ) ;
238+ this . _notiAudio = document . getElementById ( 'notificationSound' ) ;
242239 }
243240 this . _notiAudio . play ( ) ;
244241 }
245242
246243 _playInviteSound ( ) {
247244 if ( ! this . _inviteAudio ) {
248- this . _inviteAudio = new Audio ( InviteSound ) ;
245+ this . _inviteAudio = document . getElementById ( 'inviteSound' ) ;
249246 }
250247 this . _inviteAudio . play ( ) ;
251248 }
Original file line number Diff line number Diff line change @@ -475,6 +475,10 @@ textarea {
475475 supported by Chrome, Edge, Opera and Firefox */
476476}
477477
478+ audio :not ([controls ]) {
479+ display : none !important ;
480+ }
481+
478482.flex--center {
479483 display : flex ;
480484 justify-content : center ;
You can’t perform that action at this time.
0 commit comments