File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/core/src/components/YoutubePlayer Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,20 @@ const YoutubePlayer: React.FC<YoutubePlayerProps> = ({
1919 play = { autoplay }
2020 videoId = { ! videoId && ! playlist ? defaultVideoId : videoId }
2121 playList = { playlist }
22- webViewStyle = { viewStyles }
23- webViewProps = { { androidLayerType : "software" } } //Addresses a webview bug causing crashes on android: https://stackoverflow.com/a/71642894/8805150
22+ webViewStyle = { [
23+ viewStyles ,
24+ {
25+ /**
26+ * Addresses a WebView and react-navigation bug that causes apps to crash
27+ * Alternate solution is set `androidLayerType` prop to `"software"`, but that leads to player playing without video
28+ * See:
29+ * https://lonelycpp.github.io/react-native-youtube-iframe/navigation-crash/#change-webview-opacity-to-099-issue-comment
30+ * https://github.com/LonelyCpp/react-native-youtube-iframe/issues/110#issuecomment-779848787
31+ * https://github.com/react-native-webview/react-native-webview/issues/811
32+ */
33+ opacity : viewStyles . opacity < 0.99 ? viewStyles . opacity : 0.99 ,
34+ } ,
35+ ] }
2436 />
2537 ) ;
2638} ;
You can’t perform that action at this time.
0 commit comments