-
Notifications
You must be signed in to change notification settings - Fork 305
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
Issue streaming file in a video html tag #763
Comments
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
@L3o-pold Modify the header to restore normal, you can try it.
This seems to be a swoole bug. Introduced by swoole/swoole-src@8e37910 cc @Yurunsoft @NathanFreeman Duplicate of hyperf/hyperf#6223 |
@sy-records yes and no, without streaming, you are able to play the video, but you are not able to go forward or backward. Streaming is needed for this functionality. |
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here? Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.
Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue. Thanks! |
It was provided in my first message: https://github.com/L3o-pold/bug-report.git but I guess it's an issue with Swoole and not Laravel Octane so feel free to close the issue. |
@L3o-pold You can compile the master code for swoole-src to test it and see if it solves the problem. |
|
@sy-records no change with Swoole 5.1.2 😞 |
I do not reproduce on Swoole 5.1.2 but still with Octane so it seems to be an issue with how file are streamed on the Octane side. Headers seems identical with or without Octane so my only guess is that the issue is located in the binary response content. The Swoole code used to test it. $http = new Swoole\Http\Server(port: 9501);
$http->set([
'log_file' => '/dev/null',
'open_http2_protocol' => true,
'enable_static_handler' => true,
'document_root' => '/var/www/static',
'static_handler_locations' => ['/static', '/']
]);
$http->on('request', function (Swoole\Http\Request $request, Swoole\Http\Response $response) use ($http) {
$response->end('ok');
});
$http->start(); |
@nunomaduro it seems to be related from this code https://github.com/laravel/octane/blob/2.x/src/Swoole/SwooleClient.php#L204 Offset param is missing |
Can we reopen this as setting the offset param seems to fix the issue? |
Octane Version
2.1.0
Laravel Version
10.28.0
PHP Version
8.2.10
What server type are you using?
Swoole
Server Version
5.0.3
Database Driver & Version
No response
Description
When using Swoole or Open swoole, streaming a video file (mp4 hevc) and trying to display it in a video html tag result in an empty video player.
Using the same code without Octane works as expected (video player displayed and able to play the video)
Steps To Reproduce
Open http://127.0.0.1:8000 on a Chrome browser.
Video fails to load with following error:
Without Octane (
php artisan serve
) the video is playable without any issueThe text was updated successfully, but these errors were encountered: