Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ready for merge
Primarily for video support.
This also:
Notes
In testing, all browsers handle video slightly differently.
Worked across Chrome, Firefox and Safari, with each using range headers in some way.
Couldn't get Safari to chunk though. Did an initial byte request, then consumed the rest in one go, even without playing the video, bit strange and leaves the user waiting for download if they scrub.
For cloud (S3) storage, this added functionality is only semi-supported.
Range responses to the browser will work but the full content is fetched to BookStack, then partially streamed.
Means it acts the same browser side, but not great for large video as you'll still be waiting for the full content.
Could benefit in some minor cases though, especially where app hosted close to storage.
Is possible to stream on s3-side, but can't seek, so would need a specific solution to range on that side also lower down in driver. Support for s3 services could vary there. Might also be better to use a signed url base approach depending on support.
For now, this shouldn't have any added downsides, so we'll skip any added s3-specific complexity for now.
Todo