cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
8.94k stars 1.12k forks source link

`canEnablePIP` is not defined when using `'react-player/file'` #1714

Open alessandroliveri opened 6 months ago

alessandroliveri commented 6 months ago

Current Behavior

FilePlayer.canEnablePIP returns always false even if the feature is supported because it seems to be undefined here https://github.com/cookpete/react-player/blob/9d582014ebd7d62a0f408f4959489a49c04e4a66/src/ReactPlayer.js#L41

Expected Behavior

FilePlayer.canEnablePIP returns true when it should

Steps to Reproduce

  1. use import FilePlayer from 'react-player/file';
  2. call FilePlayer.canEnablePIP

Environment

Other Information

using ReactPlayer.canEnablePIP by importing it from react-player works as expected