LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
610 stars 155 forks source link

When using this player below android 11 then it is working fine but when using it in android 11 devices a different player is showing #190

Closed affan00733 closed 3 years ago

affan00733 commented 3 years ago

When using this player below android 11 then it is working fine but when using it in android 11 devices a different player is showing

What can we do

Demonbruster commented 3 years ago

Yeah I used mi phone and huawei phones with android version 10 then i got two different layout. 😞 How to solve this one @LonelyCpp

affan00733 commented 3 years ago

Yes please tell fast how to solve it

LonelyCpp commented 3 years ago

The player UI is decided by the YouTube script and this library has no control over it.

you can try tricking the script using different userAgent strings -

<YoutubePlayer
  webViewProps={{ userAgent: 'user-agent-string' }}
/>

you can find user agent strings here : https://deviceatlas.com/blog/list-of-user-agent-strings


generally, you should not rely on the YouTube UI in the player since it's entirely controlled by YouTube and they offer no customisations on top of it.

affan00733 commented 3 years ago

how and which user agent string can you tell me in detail

LonelyCpp commented 3 years ago

You would have to try them yourself by trial and error, and use whatever works for you.

affan00733 commented 3 years ago

but what is user-agent-string can give an example

LonelyCpp commented 3 years ago

Example : Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36

As mentioned, you'll find more info here : https://deviceatlas.com/blog/list-of-user-agent-strings