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
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.canPlaymethod that does not respectfileConfigsettings, egforceDASH.It seems that "normal"
ReactPlayerworks because it 'fallsback' toFilePlayerhttps://github.com/CookPete/react-player/blob/c50320a51ff152bfe8e1b01f9e17195da496c42c/src/ReactPlayer.js#L68-L76
What do you think about removing
canPlaycheck fromSinglePlayer?https://github.com/CookPete/react-player/blob/c50320a51ff152bfe8e1b01f9e17195da496c42c/src/singlePlayer.js#L47-L49There's a codesandbox example showcasing the bug:
https://codesandbox.io/s/mm2oyppzx8