Skip to content

Fragment loading/loaded events should accurately reflect "bitrateTest" property #7475

@dagalvao00

Description

@dagalvao00

Is your feature request related to a problem? Please describe.

The Fragment object contains a property called bitrateTest that is used to track if a fragment is for a bitrate test. However, this property attempts to do 2 different things:

  1. track if a fragment is used for a bitrate test
  2. track the state of the request

I believe this property would be more useful if it just did number 1. It would also allow us to document this property, which may be useful for listeners of the FRAG_LOADING/LOADED event. Today, if a listener of the FRAG_LOADED event tries to query if the fragment loaded was for a bitrate test, they will not be able to, as the property will be false after the request is completed.

Lastly, there is already a member variable in base-stream-controller that tracks the state of the bitrate test. It is not clear why we use that variable in some places in stream-controller and frag.bitrateTest in other places.

Describe the solution you'd like

The solution would be to not set frag.bitrateTest = false after the request is completed. Instead, we can use member variables in any controller that needs to know the state of the request, and continue to use frag.bitrateTest in places where we need to know if the fragment is for a test or not.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature proposalNeeds TriageIf there is a suspected stream issue, apply this label to triage if it is something we should fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions