Skip to content

Cannot auto-detect MIME type when a Media Fragment is attached #9062

@typenoob

Description

@typenoob

Description

  • Video.js automatically detects the MIME type when the element's type attribute is undefined
  • However, if a Media Fragment (e.g., #t=1) is appended to the URI, the auto-detection fails, resulting in the error:MEDIA_ERR_SRC_NOT_SUPPORTED
  • The temporary workaround involves explicitly specifying the source's type attribute

Is this a known limitation? If it’s worth fixing, I’d be happy to help implement a solution.

Reduced test case

https://codepen.io/typenoob/pen/XJbodoW

Steps to reproduce

  1. Create a element and set its src attribute, but omit the type attribute.

  2. Append a media fragment (e.g., #t=1) to the URL.

  3. Observe the console error: MEDIA_ERR_SRC_NOT_SUPPORTED (indicating MIME type detection failed).

Errors

MEDIA_ERR_SRC_NOT_SUPPORTED

What version of Video.js are you using?

8.23.3

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Chrome 136.0.7103.93

What OS(es) and version(s) does this occur with?

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: triageThis issue needs to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions