Skip to content

Commit 531a26b

Browse files
committed
fix: request video rejected
1 parent 99722e8 commit 531a26b

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

js/app/guest/video.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ export const video = (() => {
105105
.then(resToVideo)
106106
.then((v) => {
107107
vid.load();
108+
observer.observe(vid);
108109
return v;
109110
})
110111
.catch((err) => {
111112
bar.style.backgroundColor = 'red';
112113
inf.innerText = `Error loading video`;
113114
console.error(err);
114-
})
115-
.finally(() => observer.observe(vid));
115+
});
116116
});
117117
};
118118

@@ -126,7 +126,7 @@ export const video = (() => {
126126
}
127127

128128
progress.complete('video');
129-
return resToVideo(res).finally(() => {
129+
return resToVideo(res).then(() => {
130130
wrap.appendChild(vid);
131131
observer.observe(vid);
132132
});

js/connection/request.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ export const request = (method, path) => {
132132
method: String(method).toUpperCase(),
133133
};
134134

135-
window.addEventListener('offline', () => ac.abort(), { once: true });
136-
window.addEventListener('popstate', () => ac.abort(), { once: true });
137-
138135
let reqTtl = 0;
139136
let reqRetry = 0;
140137
let reqDelay = 0;

0 commit comments

Comments
 (0)