-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream video with GridFSBucketAdapter (implements byte-range requests) #6028
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6028 +/- ##
==========================================
- Coverage 93.91% 93.77% -0.14%
==========================================
Files 164 164
Lines 11084 11126 +42
==========================================
+ Hits 10409 10433 +24
- Misses 675 693 +18
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me! Do you see anyway to add a test case?
I can try to add a test. Should this return a promise? I’m planning to add this feature to the AWS S3 adapter |
Do you mean when using |
Oh no direct access doesn’t have anything to do with a range request, I created a fix for S3 https://github.com/parse-community/parse-server-s3-adapter/compare/byte-range?expand=1 |
Nice! It seems good to me as well. I will have a try! |
Every adapter will implement this differently. The current implementation doesn’t allow for adaptability. Moving handleFileStream will introduce a breaking change since it’s only compatible with GridStoreAdapter but this will force updating the adapters to support this. |
Got it. What do you think about adding a test case here? Files adapters are supposed to pass these tesss. |
There currently isn’t a test. A lot of trial and error lead to this fix. I don’t think a test prove this works but I’ll try. |
Yes... I imagined that it would be hard. Feel free to merge it with no additional tests if you want. |
* Support Byte Range Requests See parse-community/parse-server#6028 * use promises * Add Tests * rename getFileStream to handleFileStream
parse-community#6028) * Stream video with GridFSBucketAdapter (implements byte-range requests) Closes: parse-community#5834 Similar to parse-community#2437 I ran into this issue while trying to view a mov file in safari from the dashboard. * Rename getFileStream to handleFileStream
Closes: #5834
Similar to #2437
I ran into this issue while trying to view a mov file in safari from the dashboard.
Safari (iOS) sends a range header for streaming.
Range: bytes=704512-709763
This fix creates a stream and gets the data from the start and end range and send the following response.