concurrently and frontmatter
This commit is contained in:
1 parent
7831ae4b97
commit
2d18c9b3d6
5 files changed
+312
-13
No files matched your search
@@ -4,6 +4,7 @@
|
||||
<button type="submit">Submit</button>
|
||||
|
||||
<video
|
||||
v-if="videoSrc"
|
||||
controls
|
||||
ref="video"
|
||||
:src="videoSrc"
|
||||
@@ -31,7 +32,7 @@ function onVideoLoad() {
|
||||
|
||||
const vid = videoEl.value!;
|
||||
|
||||
const q_value = q.value.replace(/\.[a-z0-9]+$/, "")
|
||||
const q_value = q.value;
|
||||
|
||||
ws.onmessage = (ev) => {
|
||||
const { name, ts } = JSON.parse(ev.data);
|
||||
@@ -58,8 +59,12 @@ function onVideoLoad() {
|
||||
c.toBlob((b) => resolve(b));
|
||||
}
|
||||
|
||||
const [min, sec] = t.split('_');
|
||||
vid.currentTime = parseInt(min) * 60 + parseInt(sec) + 1;
|
||||
if (typeof t === 'string'){
|
||||
const [min, sec] = t.split('_');
|
||||
vid.currentTime = parseInt(min) * 60 + parseInt(sec) + 1;
|
||||
} else {
|
||||
vid.currentTime = t;
|
||||
}
|
||||
})
|
||||
if (b) ws.send(b);
|
||||
vid.onseeked = null;
|
||||
@@ -74,6 +79,7 @@ function onVideoLoad() {
|
||||
JSON.stringify({
|
||||
name: "download_q",
|
||||
q: q_value,
|
||||
duration: vid.duration,
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user