2018-11-24 17:54:02 +00:00
|
|
|
/**
|
|
|
|
* Notification song
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
|
2021-04-11 11:52:18 +00:00
|
|
|
const NotificationsSong = {
|
2018-11-24 17:54:02 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Song element : null by default
|
|
|
|
*/
|
|
|
|
songElem: null,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Play notification song once
|
|
|
|
*/
|
|
|
|
play: function(){
|
|
|
|
|
|
|
|
//Create song element if required
|
|
|
|
if(this.songElem == null){
|
2019-01-26 14:26:49 +00:00
|
|
|
this.songElem = new SongPlayer([
|
|
|
|
ComunicWeb.__config.assetsURL + "audio/notif_song.mp3",
|
|
|
|
ComunicWeb.__config.assetsURL + "audio/notif_song.ogg"
|
|
|
|
]);
|
2018-11-24 17:54:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//Play song
|
2019-01-26 14:26:49 +00:00
|
|
|
this.songElem.playOnce();
|
2018-11-24 17:54:02 +00:00
|
|
|
}
|
|
|
|
}
|