Skip to content

Unable to detect mimeType from non-gap segments change #8032

Open
@yyamaguchi93

Description

Re-opening unresolved bug that was archived: #7119

Have you read the Tutorials?
Yes

Have you read the FAQ and checked for duplicate open issues?
Yes

If the question is related to FairPlay, have you read the tutorial?

No

What version of Shaka Player are you using?
4.10.9

What browser and OS are you using?
Chrome on iOS

Please ask your question
I am trying to play a HLS manifest where the segment URIs on it does not have a extension, which makes shaka to try to retrieve the segment basic info from the segment request content-type header. In my case, this will return application/octet-stream. When that happens, none of the conditions regarding mimeType and extension will be satisfied and shaka will return a basic info where the type will be application/octet-stream back to convertParsedPlaylistIntoStreamInfo_ method. Shaka will then call makeStreamObject_ passing application/octet-stream as the type and, within makeStreamObject_ method, shaka will call guessMimeTypeFallback_ which will throw an error TypeError: Cannot read properties of undefined (reading 'get') because shaka.hls.HlsParser.EXTENSION_MAP_BY_CONTENT_TYPE_[contentType] map does not have an entry to application/octet-stream.

This issue does not happen on 4.9.x versions.
4.9.x versions will use mime type set in HlsManifestConfiguration.mediaPlaylistFullMimeType instead of throwing an error.

Metadata

Assignees

No one assigned

    Labels

    status: waiting on responseWaiting on a response from the reporter(s) of the issuetype: bugSomething isn't working correctly

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions