react-native-youtube: On Android, `YouTube` component which is in `ScrollView` stops playback.
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)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (4 by maintainers)
@andrerfneves +1.
I think it got tangled with old version, you are right working with
v1worked after deleting the old version fromnode_modules. Thanks