Skip to content

Single FilePlayer does not respect file forceDASH config #500

Description

@Obi-Dann

In order to reduce the bundle size, I am keen on using SinglePlayer for FilePlayer.
However, the player behaves differently from the "normal" player and does not work as a drop in replacement.
I think the problem is with FilePlayer.canPlay method that does not respect fileConfig settings, eg forceDASH.
It seems that "normal" ReactPlayer works because it 'fallsback' to FilePlayer
https://github.com/CookPete/react-player/blob/c50320a51ff152bfe8e1b01f9e17195da496c42c/src/ReactPlayer.js#L68-L76

What do you think about removing canPlay check from SinglePlayer ?https://github.com/CookPete/react-player/blob/c50320a51ff152bfe8e1b01f9e17195da496c42c/src/singlePlayer.js#L47-L49

There's a codesandbox example showcasing the bug:
https://codesandbox.io/s/mm2oyppzx8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions