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
9.38k stars 1.15k forks source link

it could not play while I opening on Chrome v.56 in Android device #157

Closed hlex closed 7 years ago

hlex commented 7 years ago

Hi CookPete !

First of all, Thank you for awesome library for playing video with react. It's help me a lots but I have some issue to solve.

I am working with web application that have to run on android box. it is a digital signages application which showing advertisement such as images and videos.

The problem is that react-player couldn't play video in Android Device (It just showed the image of first scene seems like it's not playing) same as normal when I opened in my Macbook pro. this is mean that your lib could work on PC but I don't know what happen on the Android Device.

it doesn't show the controls bar.

Please consider it for me. Big thanks in advance.

cookpete commented 7 years ago

What props are you passing in exactly? It depends on what you are playing. If you are just passing a video file then all ReactPlayer does is render a <video> tag with the src set to your video URL, and leaves the rest up to the browser. It could be loading the video but not autoplaying correctly due to mobile browser limitations (see mobile considerations in the readme).

cookpete commented 7 years ago

Also, make sure you are passing the playing prop, as it is false by default. You also might want to try passing in the autoPlay attribute:

<ReactPlayer
  url='file.mp4'
  fileConfig={{ attributes: { autoPlay: true } }}
/>

Reopen the issue if you are still struggling.