Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upVideos doesn't work #1080
Videos doesn't work #1080
Comments
This comment has been minimized.
This comment has been minimized.
|
Added audio test, it works. |
This comment has been minimized.
This comment has been minimized.
|
Your server is misbehaving. It claims to support Range requests but it's not handling them correctly. Look at the network tab in Chrome, at the request for
So, a valid server response is either:
In case 2, the server will include the following headers:
The first indicates that it supports Range requests, and the second confirms the range that is being returned. Your server is doing a mix of these things which is incorrect:
If you replace the web seed URL with https://webtorrent.io/torrents/sintel-1024-surround.mp4 you can see how a well-behaved server works. |
This comment has been minimized.
This comment has been minimized.
|
But I see Content-Range... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Content-Range isn't being set when the XHR request is made from the page. Look in the Network tab on your page: https://andreapaiola.name/php-p2p-webtorrent-cdn/video.php These are the response headers:
It's definitely odd that the correct headers are set when you visit the URL directly. I would look at the headers that are being sent with each request and see if there's a difference that's causing your server to misbehave. |
This comment has been minimized.
This comment has been minimized.
|
Yeah I made a simple XHR request and I can confirm that https://andreapaiola.name/php-p2p-webtorrent-cdn/video-test.php I disabled gzip compression for .mp4 files with
in the .htaccess and now it works |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |



What version of WebTorrent?
v0.98.14
What browser and version? (if using WebTorrent in the browser)
Chrome and Firefox, maybe all?
What did you expect to happen?
Images and videos load and render...
What actually happened?
Images work
Video doesn't work
Example:
https://andreapaiola.name/php-p2p-webtorrent-cdn/
Only a video
https://andreapaiola.name/php-p2p-webtorrent-cdn/video.php
The .torrent files are generated by php, but in a BitTorrent client like Transmission all works...