|
|
@ -1,6 +1,7 @@
|
|
|
|
/* generated by Svelte vX.Y.Z */
|
|
|
|
/* generated by Svelte vX.Y.Z */
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
SvelteComponent,
|
|
|
|
SvelteComponent,
|
|
|
|
|
|
|
|
add_render_callback,
|
|
|
|
detach,
|
|
|
|
detach,
|
|
|
|
element,
|
|
|
|
element,
|
|
|
|
init,
|
|
|
|
init,
|
|
|
@ -8,6 +9,7 @@ import {
|
|
|
|
listen,
|
|
|
|
listen,
|
|
|
|
noop,
|
|
|
|
noop,
|
|
|
|
raf,
|
|
|
|
raf,
|
|
|
|
|
|
|
|
run_all,
|
|
|
|
safe_not_equal
|
|
|
|
safe_not_equal
|
|
|
|
} from "svelte/internal";
|
|
|
|
} from "svelte/internal";
|
|
|
|
|
|
|
|
|
|
|
@ -31,7 +33,12 @@ function create_fragment(ctx) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
c() {
|
|
|
|
c() {
|
|
|
|
video = element("video");
|
|
|
|
video = element("video");
|
|
|
|
dispose = listen(video, "timeupdate", video_timeupdate_handler);
|
|
|
|
if (ctx.videoHeight === void 0 || ctx.videoWidth === void 0) add_render_callback(() => ctx.video_resize_handler.call(video));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispose = [
|
|
|
|
|
|
|
|
listen(video, "timeupdate", video_timeupdate_handler),
|
|
|
|
|
|
|
|
listen(video, "resize", ctx.video_resize_handler)
|
|
|
|
|
|
|
|
];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
m(target, anchor) {
|
|
|
|
m(target, anchor) {
|
|
|
|
insert(target, video, anchor);
|
|
|
|
insert(target, video, anchor);
|
|
|
@ -47,30 +54,52 @@ function create_fragment(ctx) {
|
|
|
|
o: noop,
|
|
|
|
o: noop,
|
|
|
|
d(detaching) {
|
|
|
|
d(detaching) {
|
|
|
|
if (detaching) detach(video);
|
|
|
|
if (detaching) detach(video);
|
|
|
|
dispose();
|
|
|
|
run_all(dispose);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
|
|
let { currentTime } = $$props;
|
|
|
|
let { currentTime } = $$props;
|
|
|
|
|
|
|
|
let { videoHeight } = $$props;
|
|
|
|
|
|
|
|
let { videoWidth } = $$props;
|
|
|
|
|
|
|
|
|
|
|
|
function video_timeupdate_handler() {
|
|
|
|
function video_timeupdate_handler() {
|
|
|
|
currentTime = this.currentTime;
|
|
|
|
currentTime = this.currentTime;
|
|
|
|
$$invalidate("currentTime", currentTime);
|
|
|
|
$$invalidate("currentTime", currentTime);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function video_resize_handler() {
|
|
|
|
|
|
|
|
videoHeight = this.videoHeight;
|
|
|
|
|
|
|
|
videoWidth = this.videoWidth;
|
|
|
|
|
|
|
|
$$invalidate("videoHeight", videoHeight);
|
|
|
|
|
|
|
|
$$invalidate("videoWidth", videoWidth);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$$self.$set = $$props => {
|
|
|
|
$$self.$set = $$props => {
|
|
|
|
if ("currentTime" in $$props) $$invalidate("currentTime", currentTime = $$props.currentTime);
|
|
|
|
if ("currentTime" in $$props) $$invalidate("currentTime", currentTime = $$props.currentTime);
|
|
|
|
|
|
|
|
if ("videoHeight" in $$props) $$invalidate("videoHeight", videoHeight = $$props.videoHeight);
|
|
|
|
|
|
|
|
if ("videoWidth" in $$props) $$invalidate("videoWidth", videoWidth = $$props.videoWidth);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return { currentTime, video_timeupdate_handler };
|
|
|
|
return {
|
|
|
|
|
|
|
|
currentTime,
|
|
|
|
|
|
|
|
videoHeight,
|
|
|
|
|
|
|
|
videoWidth,
|
|
|
|
|
|
|
|
video_timeupdate_handler,
|
|
|
|
|
|
|
|
video_resize_handler
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class Component extends SvelteComponent {
|
|
|
|
class Component extends SvelteComponent {
|
|
|
|
constructor(options) {
|
|
|
|
constructor(options) {
|
|
|
|
super();
|
|
|
|
super();
|
|
|
|
init(this, options, instance, create_fragment, safe_not_equal, { currentTime: 0 });
|
|
|
|
|
|
|
|
|
|
|
|
init(this, options, instance, create_fragment, safe_not_equal, {
|
|
|
|
|
|
|
|
currentTime: 0,
|
|
|
|
|
|
|
|
videoHeight: 0,
|
|
|
|
|
|
|
|
videoWidth: 0
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|