question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

On Android, `YouTube` component which is in `ScrollView` stops playback.

See original GitHub issue

Summary

On Android, YouTube component which is in ScrollView stops playback.

Detail

On Android, if YouTube component puts in ReactNative ScrollView component, playback is terminated. adb logcat says:

10-14 11:23:25.977 23083 23083 W YouTubeAndroidPlayerAPI: YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ancestor android.widget.FrameLayout{fcacd54 V.E...... ......I. 0,0-0,0}. The distances between the ancestor's edges and that of the YouTubePlayerView is: left: 0, top: 0, right: -1794, bottom: -1080 (these should all be positive).

You can reproduce it by Example/index.android.js with modification such as:

      <ScrollView
        style={{width: 520, height: 500}}
        <YouTube
           (suppress...)
        />
      </ScrollView>

You can replace style of ScrollView to any, but you have to assign some scrollable area.

This code works well on any iOS devices.

Information

ReactNative: v0.35.0 react-native-youtube: v0.8.0 Device: Nexus 5X / Android 7.0(NBD90W)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
antonsivogrivovcommented, Nov 3, 2016
1reaction
cubbukcommented, Mar 25, 2017

I think it got tangled with old version, you are right working with v1 worked after deleting the old version from node_modules. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

On Android, YouTube component which is in ScrollView stops ...
On Android, if YouTube component puts in ReactNative ScrollView component, playback is terminated. adb logcat says: 10-14 11:23:25.977 23083 ...
Read more >
YouTube player in ScrollView android - Stack Overflow
W/YouTubeAndroidPlayerAPI: YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ...
Read more >
ListView inside ScrollView is not scrolling on Android - YouTube
Android : ListView inside ScrollView is not scrolling on Android [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
Android Studio How to use scroll view (ScrollView) - YouTube
In this video I am going to show you how to:use scroll view ( scrollView ) in android studioin Android Studio Version ...
Read more >
Android: Detect when ScrollView stops scrolling - YouTube
Android : Android : Detect when ScrollView stops scrolling [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found