Conversation
Deploying drive-web with
|
| Latest commit: |
381ac3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6ff7542f.drive-web.pages.dev |
| Branch Preview URL: | https://fix-browser-crashes-in-large.drive-web.pages.dev |
…m:internxt/drive-web into fix/browser-crashes-in-large-items-upload
|
|
||
| const session = new VideoStreamingSession({ | ||
| fileId: file.fileId, | ||
| fileId: file.fileId ?? '', |
There was a problem hiding this comment.
If fileId is nullish or empty, then it means it is an empty file so it cannot be played. Maybe its a good idea to disable the preview when that happens or just throw an error if this code is not really reachable
wdyt? 🤔
There was a problem hiding this comment.
Yep, we can do that. I just leave it as it is because the flow will throw an error when trying to download the requested chunk, but yeah, let's throw an early error.
| if (this.iframe) { | ||
| this.iframe.remove(); | ||
| this.iframe = null; | ||
| this.sendToIframe('DESTROY', {}); |
There was a problem hiding this comment.
I believe this will never do anything because the iframe is null and the condition will never be satisfied
There was a problem hiding this comment.
Yep. We should to emit the event before removing the iframe and updating the reference to null
| resolve(); | ||
| } |
There was a problem hiding this comment.
without a return after the resolve the function will continue executing and add second iframe
|
|
||
| video.addEventListener('error', handleError); | ||
| video.addEventListener('canplay', handleCanPlay); | ||
| video.addEventListener('error', (error) => handleOnError(error.message)); |
There was a problem hiding this comment.
the removeEventListener will not work because it uses a different anonymous function.
removeEventListener compares by reference, so the arrow function of add and remove are two different objects in memory
There was a problem hiding this comment.
Indeed. IT has been updated.
|



Description
Refactored the video streaming architecture to scope the Service Worker under
video-stream, isolating streaming traffic and simplifying client communication.The updated flow works as follows:
The Service Worker is now registered under the video-stream scope, meaning it only intercepts network requests within that path. This ensures streaming logic is fully isolated from the rest of the application.
Introduced a dedicated player.html file that embeds the
The client-side video streaming service/session logic has been refactored and simplified. It now communicates directly with the embedded HTML player.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes