|
|
@ -19,6 +19,7 @@ function create_fragment(ctx) {
|
|
|
|
let audio_updating = false;
|
|
|
|
let audio_updating = false;
|
|
|
|
let audio_animationframe;
|
|
|
|
let audio_animationframe;
|
|
|
|
let audio_is_paused = true;
|
|
|
|
let audio_is_paused = true;
|
|
|
|
|
|
|
|
let mounted;
|
|
|
|
let dispose;
|
|
|
|
let dispose;
|
|
|
|
|
|
|
|
|
|
|
|
function audio_timeupdate_handler() {
|
|
|
|
function audio_timeupdate_handler() {
|
|
|
@ -42,7 +43,7 @@ function create_fragment(ctx) {
|
|
|
|
if (/*seeking*/ ctx[8] === void 0) add_render_callback(() => /*audio_seeking_seeked_handler*/ ctx[17].call(audio));
|
|
|
|
if (/*seeking*/ ctx[8] === void 0) add_render_callback(() => /*audio_seeking_seeked_handler*/ ctx[17].call(audio));
|
|
|
|
if (/*ended*/ ctx[9] === void 0) add_render_callback(() => /*audio_ended_handler*/ ctx[18].call(audio));
|
|
|
|
if (/*ended*/ ctx[9] === void 0) add_render_callback(() => /*audio_ended_handler*/ ctx[18].call(audio));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
m(target, anchor, remount) {
|
|
|
|
m(target, anchor) {
|
|
|
|
insert(target, audio, anchor);
|
|
|
|
insert(target, audio, anchor);
|
|
|
|
|
|
|
|
|
|
|
|
if (!isNaN(/*volume*/ ctx[6])) {
|
|
|
|
if (!isNaN(/*volume*/ ctx[6])) {
|
|
|
@ -53,21 +54,23 @@ function create_fragment(ctx) {
|
|
|
|
audio.playbackRate = /*playbackRate*/ ctx[7];
|
|
|
|
audio.playbackRate = /*playbackRate*/ ctx[7];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (remount) run_all(dispose);
|
|
|
|
if (!mounted) {
|
|
|
|
|
|
|
|
dispose = [
|
|
|
|
dispose = [
|
|
|
|
listen(audio, "progress", /*audio_progress_handler*/ ctx[10]),
|
|
|
|
listen(audio, "progress", /*audio_progress_handler*/ ctx[10]),
|
|
|
|
listen(audio, "loadedmetadata", /*audio_loadedmetadata_handler*/ ctx[11]),
|
|
|
|
listen(audio, "loadedmetadata", /*audio_loadedmetadata_handler*/ ctx[11]),
|
|
|
|
listen(audio, "timeupdate", audio_timeupdate_handler),
|
|
|
|
listen(audio, "timeupdate", audio_timeupdate_handler),
|
|
|
|
listen(audio, "durationchange", /*audio_durationchange_handler*/ ctx[13]),
|
|
|
|
listen(audio, "durationchange", /*audio_durationchange_handler*/ ctx[13]),
|
|
|
|
listen(audio, "play", /*audio_play_pause_handler*/ ctx[14]),
|
|
|
|
listen(audio, "play", /*audio_play_pause_handler*/ ctx[14]),
|
|
|
|
listen(audio, "pause", /*audio_play_pause_handler*/ ctx[14]),
|
|
|
|
listen(audio, "pause", /*audio_play_pause_handler*/ ctx[14]),
|
|
|
|
listen(audio, "volumechange", /*audio_volumechange_handler*/ ctx[15]),
|
|
|
|
listen(audio, "volumechange", /*audio_volumechange_handler*/ ctx[15]),
|
|
|
|
listen(audio, "ratechange", /*audio_ratechange_handler*/ ctx[16]),
|
|
|
|
listen(audio, "ratechange", /*audio_ratechange_handler*/ ctx[16]),
|
|
|
|
listen(audio, "seeking", /*audio_seeking_seeked_handler*/ ctx[17]),
|
|
|
|
listen(audio, "seeking", /*audio_seeking_seeked_handler*/ ctx[17]),
|
|
|
|
listen(audio, "seeked", /*audio_seeking_seeked_handler*/ ctx[17]),
|
|
|
|
listen(audio, "seeked", /*audio_seeking_seeked_handler*/ ctx[17]),
|
|
|
|
listen(audio, "ended", /*audio_ended_handler*/ ctx[18])
|
|
|
|
listen(audio, "ended", /*audio_ended_handler*/ ctx[18])
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
mounted = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
p(ctx, [dirty]) {
|
|
|
|
p(ctx, [dirty]) {
|
|
|
|
if (!audio_updating && dirty & /*currentTime*/ 8 && !isNaN(/*currentTime*/ ctx[3])) {
|
|
|
|
if (!audio_updating && dirty & /*currentTime*/ 8 && !isNaN(/*currentTime*/ ctx[3])) {
|
|
|
@ -92,6 +95,7 @@ function create_fragment(ctx) {
|
|
|
|
o: noop,
|
|
|
|
o: noop,
|
|
|
|
d(detaching) {
|
|
|
|
d(detaching) {
|
|
|
|
if (detaching) detach(audio);
|
|
|
|
if (detaching) detach(audio);
|
|
|
|
|
|
|
|
mounted = false;
|
|
|
|
run_all(dispose);
|
|
|
|
run_all(dispose);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|