@ -29,18 +29,18 @@ function create_fragment(ctx) {
audio _updating = true ;
}
/*audio_timeupdate_handler*/ ctx [ 1 2 ] . call ( audio ) ;
/*audio_timeupdate_handler*/ ctx [ 1 3 ] . call ( audio ) ;
}
return {
c ( ) {
audio = element ( "audio" ) ;
if ( /*buffered*/ ctx [ 0 ] === void 0 ) add _render _callback ( ( ) => /*audio_progress_handler*/ ctx [ 1 0 ] . call ( audio ) ) ;
if ( /*buffered*/ ctx [ 0 ] === void 0 || /*seekable*/ ctx [ 1 ] === void 0 ) add _render _callback ( ( ) => /*audio_loadedmetadata_handler*/ ctx [ 1 1 ] . call ( audio ) ) ;
if ( /*played*/ ctx [ 2 ] === void 0 || /*currentTime*/ ctx [ 3 ] === void 0 || /*ended*/ ctx [ 9 ] === void 0 ) add _render _callback ( audio _timeupdate _handler ) ;
if ( /*duration*/ ctx [ 4 ] === void 0 ) add _render _callback ( ( ) => /*audio_durationchange_handler*/ ctx [ 1 3 ] . call ( audio ) ) ;
if ( /*seeking*/ ctx [ 8 ] === void 0 ) add _render _callback ( ( ) => /*audio_seeking_seeked_handler*/ ctx [ 1 7 ] . call ( audio ) ) ;
if ( /*ended*/ ctx [ 9 ] === void 0 ) add _render _callback ( ( ) => /*audio_ended_handler*/ ctx [ 1 8 ] . call ( audio ) ) ;
if ( /*buffered*/ ctx [ 0 ] === void 0 ) add _render _callback ( ( ) => /*audio_progress_handler*/ ctx [ 1 1 ] . call ( audio ) ) ;
if ( /*buffered*/ ctx [ 0 ] === void 0 || /*seekable*/ ctx [ 1 ] === void 0 ) add _render _callback ( ( ) => /*audio_loadedmetadata_handler*/ ctx [ 1 2 ] . call ( audio ) ) ;
if ( /*played*/ ctx [ 2 ] === void 0 || /*currentTime*/ ctx [ 3 ] === void 0 || /*ended*/ ctx [ 10 ] === void 0 ) add _render _callback ( audio _timeupdate _handler ) ;
if ( /*duration*/ ctx [ 4 ] === void 0 ) add _render _callback ( ( ) => /*audio_durationchange_handler*/ ctx [ 1 4 ] . call ( audio ) ) ;
if ( /*seeking*/ ctx [ 9 ] === void 0 ) add _render _callback ( ( ) => /*audio_seeking_seeked_handler*/ ctx [ 1 8 ] . call ( audio ) ) ;
if ( /*ended*/ ctx [ 10 ] === void 0 ) add _render _callback ( ( ) => /*audio_ended_handler*/ ctx [ 1 9 ] . call ( audio ) ) ;
} ,
m ( target , anchor , remount ) {
insert ( target , audio , anchor ) ;
@ -49,24 +49,26 @@ function create_fragment(ctx) {
audio . volume = /*volume*/ ctx [ 6 ] ;
}
if ( ! isNaN ( /*playbackRate*/ ctx [ 7 ] ) ) {
audio . playbackRate = /*playbackRate*/ ctx [ 7 ] ;
audio . muted = /*muted*/ ctx [ 7 ] ;
if ( ! isNaN ( /*playbackRate*/ ctx [ 8 ] ) ) {
audio . playbackRate = /*playbackRate*/ ctx [ 8 ] ;
}
if ( remount ) run _all ( dispose ) ;
dispose = [
listen ( audio , "progress" , /*audio_progress_handler*/ ctx [ 1 0 ] ) ,
listen ( audio , "loadedmetadata" , /*audio_loadedmetadata_handler*/ ctx [ 1 1 ] ) ,
listen ( audio , "progress" , /*audio_progress_handler*/ ctx [ 1 1 ] ) ,
listen ( audio , "loadedmetadata" , /*audio_loadedmetadata_handler*/ ctx [ 1 2 ] ) ,
listen ( audio , "timeupdate" , audio _timeupdate _handler ) ,
listen ( audio , "durationchange" , /*audio_durationchange_handler*/ ctx [ 1 3 ] ) ,
listen ( audio , "play" , /*audio_play_pause_handler*/ ctx [ 1 4 ] ) ,
listen ( audio , "pause" , /*audio_play_pause_handler*/ ctx [ 1 4 ] ) ,
listen ( audio , "volumechange" , /*audio_volumechange_handler*/ ctx [ 1 5 ] ) ,
listen ( audio , "ratechange" , /*audio_ratechange_handler*/ ctx [ 1 6 ] ) ,
listen ( audio , "seeking" , /*audio_seeking_seeked_handler*/ ctx [ 1 7 ] ) ,
listen ( audio , "seeked" , /*audio_seeking_seeked_handler*/ ctx [ 1 7 ] ) ,
listen ( audio , "ended" , /*audio_ended_handler*/ ctx [ 1 8 ] )
listen ( audio , "durationchange" , /*audio_durationchange_handler*/ ctx [ 1 4 ] ) ,
listen ( audio , "play" , /*audio_play_pause_handler*/ ctx [ 1 5 ] ) ,
listen ( audio , "pause" , /*audio_play_pause_handler*/ ctx [ 1 5 ] ) ,
listen ( audio , "volumechange" , /*audio_volumechange_handler*/ ctx [ 1 6 ] ) ,
listen ( audio , "ratechange" , /*audio_ratechange_handler*/ ctx [ 1 7 ] ) ,
listen ( audio , "seeking" , /*audio_seeking_seeked_handler*/ ctx [ 1 8 ] ) ,
listen ( audio , "seeked" , /*audio_seeking_seeked_handler*/ ctx [ 1 8 ] ) ,
listen ( audio , "ended" , /*audio_ended_handler*/ ctx [ 1 9 ] )
] ;
} ,
p ( ctx , [ dirty ] ) {
@ -84,8 +86,12 @@ function create_fragment(ctx) {
audio . volume = /*volume*/ ctx [ 6 ] ;
}
if ( dirty & /*playbackRate*/ 128 && ! isNaN ( /*playbackRate*/ ctx [ 7 ] ) ) {
audio . playbackRate = /*playbackRate*/ ctx [ 7 ] ;
if ( dirty & /*muted*/ 128 ) {
audio . muted = /*muted*/ ctx [ 7 ] ;
}
if ( dirty & /*playbackRate*/ 256 && ! isNaN ( /*playbackRate*/ ctx [ 8 ] ) ) {
audio . playbackRate = /*playbackRate*/ ctx [ 8 ] ;
}
} ,
i : noop ,
@ -105,6 +111,7 @@ function instance($$self, $$props, $$invalidate) {
let { duration } = $$props ;
let { paused } = $$props ;
let { volume } = $$props ;
let { muted } = $$props ;
let { playbackRate } = $$props ;
let { seeking } = $$props ;
let { ended } = $$props ;
@ -127,7 +134,7 @@ function instance($$self, $$props, $$invalidate) {
ended = this . ended ;
$$invalidate ( 2 , played ) ;
$$invalidate ( 3 , currentTime ) ;
$$invalidate ( 9 , ended ) ;
$$invalidate ( 10 , ended ) ;
}
function audio _durationchange _handler ( ) {
@ -142,22 +149,24 @@ function instance($$self, $$props, $$invalidate) {
function audio _volumechange _handler ( ) {
volume = this . volume ;
muted = this . muted ;
$$invalidate ( 6 , volume ) ;
$$invalidate ( 7 , muted ) ;
}
function audio _ratechange _handler ( ) {
playbackRate = this . playbackRate ;
$$invalidate ( 7 , playbackRate ) ;
$$invalidate ( 8 , playbackRate ) ;
}
function audio _seeking _seeked _handler ( ) {
seeking = this . seeking ;
$$invalidate ( 8 , seeking ) ;
$$invalidate ( 9 , seeking ) ;
}
function audio _ended _handler ( ) {
ended = this . ended ;
$$invalidate ( 9 , ended ) ;
$$invalidate ( 10 , ended ) ;
}
$$self . $set = $$props => {
@ -168,9 +177,10 @@ function instance($$self, $$props, $$invalidate) {
if ( "duration" in $$props ) $$invalidate ( 4 , duration = $$props . duration ) ;
if ( "paused" in $$props ) $$invalidate ( 5 , paused = $$props . paused ) ;
if ( "volume" in $$props ) $$invalidate ( 6 , volume = $$props . volume ) ;
if ( "playbackRate" in $$props ) $$invalidate ( 7 , playbackRate = $$props . playbackRate ) ;
if ( "seeking" in $$props ) $$invalidate ( 8 , seeking = $$props . seeking ) ;
if ( "ended" in $$props ) $$invalidate ( 9 , ended = $$props . ended ) ;
if ( "muted" in $$props ) $$invalidate ( 7 , muted = $$props . muted ) ;
if ( "playbackRate" in $$props ) $$invalidate ( 8 , playbackRate = $$props . playbackRate ) ;
if ( "seeking" in $$props ) $$invalidate ( 9 , seeking = $$props . seeking ) ;
if ( "ended" in $$props ) $$invalidate ( 10 , ended = $$props . ended ) ;
} ;
return [
@ -181,6 +191,7 @@ function instance($$self, $$props, $$invalidate) {
duration ,
paused ,
volume ,
muted ,
playbackRate ,
seeking ,
ended ,
@ -208,9 +219,10 @@ class Component extends SvelteComponent {
duration : 4 ,
paused : 5 ,
volume : 6 ,
playbackRate : 7 ,
seeking : 8 ,
ended : 9
muted : 7 ,
playbackRate : 8 ,
seeking : 9 ,
ended : 10
} ) ;
}
}