mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-23 23:24:42 +03:00
Merge b9492c653d
into f7f54f8754
This commit is contained in:
commit
a7979c346f
@ -60,11 +60,14 @@
|
|||||||
* @param {String} file File path
|
* @param {String} file File path
|
||||||
*/
|
*/
|
||||||
Mibew.Utils.playSound = function (file) {
|
Mibew.Utils.playSound = function (file) {
|
||||||
var soundHTML = '<audio autoplay style="display: none;">' +
|
if(!document.getElementById("mibew_audio_alert")) {
|
||||||
'<source src="' + file + '" type="audio/x-wav" />' +
|
var soundHTML = '<audio autoplay id="mibew_audio_alert" style="display: none;">' +
|
||||||
'<embed src="' + file + '" type="audio/x-wav" hidden="true" autostart="true" loop="false" />' +
|
'<source src="' + file + '" type="audio/x-wav" />' +
|
||||||
'</audio>';
|
'<embed src="' + file + '" type="audio/x-wav" hidden="true" autostart="true" loop="false" />' +
|
||||||
$('body').append(soundHTML);
|
'</audio>';
|
||||||
|
$('body').append(soundHTML);
|
||||||
|
}
|
||||||
|
document.getElementById('mibew_audio_alert').play();
|
||||||
}
|
}
|
||||||
|
|
||||||
})(Mibew, $);
|
})(Mibew, $);
|
Loading…
Reference in New Issue
Block a user