ComunicWeb/assets/js/components/notifications/song.js

30 lines
510 B
JavaScript
Raw Normal View History

/**
* Notification song
*
* @author Pierre HUBERT
*/
ComunicWeb.components.notifications.song = {
/**
* 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"
]);
}
//Play song
2019-01-26 14:26:49 +00:00
this.songElem.playOnce();
}
}