initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
(function (ns, $) {
|
||||
'use strict';
|
||||
ns.AudioPlayer = {
|
||||
load(url) {
|
||||
const audio = $('#poi-audio');
|
||||
audio[0].pause(); audio.attr('src', url || '').toggle(Boolean(url));
|
||||
if (url) audio[0].load();
|
||||
},
|
||||
play() { const audio = $('#poi-audio')[0]; if (audio.src) return audio.play(); }
|
||||
};
|
||||
}(window.Wegwichtel, window.jQuery));
|
||||
Reference in New Issue
Block a user