Skip to content
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

fix: Use middle segment when guessing MIME type on HLS #4270

Conversation

RaymondCheng
Copy link
Contributor

@RaymondCheng RaymondCheng commented Jun 3, 2022

I have been working with a server which is too aggressive at expiring
segments at the left edge of its DVR. As a result of this, when Shaka's
HLS manifest parser puts out a HEAD request on the first segment to
guess its MIME type, sometimes the segment has already been removed
(404). I have filed a bug against the server team and I hope they relax
the expiration, but truth be told if you wait long enough, any request
against the left edge of DVR will eventually fail. It seems like a
simple workaround for now to simply request the middle segment rather
than the first segment.

Closes #4269

@RaymondCheng RaymondCheng force-pushed the raych/chooseMiddleSegmentHeadReq branch from f72b081 to 44b1ecc Compare June 3, 2022 18:27
@RaymondCheng RaymondCheng changed the title Use middle segment when guessing MIME type on HLS (#4269). fix: Use middle segment when guessing MIME type on HLS (#4269) Jun 3, 2022
@RaymondCheng RaymondCheng force-pushed the raych/chooseMiddleSegmentHeadReq branch from 44b1ecc to de38bce Compare June 4, 2022 07:47
…#4269)

I have been working with a server which is too aggressive at expiring
segments at the left edge of its DVR. As a result of this, when Shaka's
HLS manifest parser puts out a HEAD request on the first segment to
guess its MIME type, sometimes the segment has already been removed
(404). I have filed a bug against the server team and I hope they relax
the expiration, but truth be told if you wait long enough, any request
against the left edge of DVR will eventually fail. It seems like a
simple workaround for now to simply request the middle segment rather
than the first segment.
@RaymondCheng RaymondCheng force-pushed the raych/chooseMiddleSegmentHeadReq branch from de38bce to 270f87a Compare June 4, 2022 08:58
@avelad avelad added type: bug Something isn't working correctly component: HLS The issue involves Apple's HLS manifest format labels Jun 5, 2022
@avelad avelad added this to the v4.2 milestone Jun 5, 2022
@joeyparrish
Copy link
Member

This is wonderful. I encountered the same issue recently. Thanks for the fix!

@joeyparrish joeyparrish merged commit 3d27d2a into shaka-project:main Jun 7, 2022
@joeyparrish joeyparrish changed the title fix: Use middle segment when guessing MIME type on HLS (#4269) fix: Use middle segment when guessing MIME type on HLS Jun 7, 2022
avelad pushed a commit to avelad/shaka-player that referenced this pull request Jun 8, 2022
…#4269) (shaka-project#4270)

I have been working with a server which is too aggressive at expiring
segments at the left edge of its DVR. As a result of this, when Shaka's
HLS manifest parser puts out a HEAD request on the first segment to
guess its MIME type, sometimes the segment has already been removed
(404). I have filed a bug against the server team and I hope they relax
the expiration, but truth be told if you wait long enough, any request
against the left edge of DVR will eventually fail. It seems like a
simple workaround for now to simply request the middle segment rather
than the first segment.

Closes shaka-project#4269

Co-authored-by: Raymond Cheng <[email protected]>
avelad pushed a commit that referenced this pull request Jun 14, 2022
I have been working with a server which is too aggressive at expiring
segments at the left edge of its DVR. As a result of this, when Shaka's
HLS manifest parser puts out a HEAD request on the first segment to
guess its MIME type, sometimes the segment has already been removed
(404). I have filed a bug against the server team and I hope they relax
the expiration, but truth be told if you wait long enough, any request
against the left edge of DVR will eventually fail. It seems like a
simple workaround for now to simply request the middle segment rather
than the first segment.

Closes #4269

Co-authored-by: Raymond Cheng <[email protected]>
avelad pushed a commit that referenced this pull request Jun 14, 2022
I have been working with a server which is too aggressive at expiring
segments at the left edge of its DVR. As a result of this, when Shaka's
HLS manifest parser puts out a HEAD request on the first segment to
guess its MIME type, sometimes the segment has already been removed
(404). I have filed a bug against the server team and I hope they relax
the expiration, but truth be told if you wait long enough, any request
against the left edge of DVR will eventually fail. It seems like a
simple workaround for now to simply request the middle segment rather
than the first segment.

Closes #4269

Co-authored-by: Raymond Cheng <[email protected]>
joeyparrish pushed a commit that referenced this pull request Jun 14, 2022
I have been working with a server which is too aggressive at expiring
segments at the left edge of its DVR. As a result of this, when Shaka's
HLS manifest parser puts out a HEAD request on the first segment to
guess its MIME type, sometimes the segment has already been removed
(404). I have filed a bug against the server team and I hope they relax
the expiration, but truth be told if you wait long enough, any request
against the left edge of DVR will eventually fail. It seems like a
simple workaround for now to simply request the middle segment rather
than the first segment.

Closes #4269

Co-authored-by: Raymond Cheng <[email protected]>
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HLS use middle segment when guessing MIME type
3 participants