Open dpoqramGTI opened 1 month ago
Describe the bug Pressing on fullscreen button forces re-rendering
https://github.com/user-attachments/assets/60a6cf52-1a61-4dcd-ac44-928820c36936
How can i solve this issue, it only happens on android,
Here is the code:
import React, { useState } from 'react'; import { View } from 'react-native'; import YoutubePlayer from 'react-native-youtube-iframe'; interface YoutubePlayerProps { mediaUrl: string; } const YoutubePlayerComponent: React.FC<YoutubePlayerProps> = ({ mediaUrl }) => { const getVideoId = (url: string): string => { const videoIdMatch = url.match(/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/); return videoIdMatch ? videoIdMatch[1] : ''; }; return ( <View> <YoutubePlayer height={350} videoId={getVideoId(mediaUrl)} onError={(e) => console.error('Error loading video', e)} /> </View> ); };
Describe the bug Pressing on fullscreen button forces re-rendering
https://github.com/user-attachments/assets/60a6cf52-1a61-4dcd-ac44-928820c36936
How can i solve this issue, it only happens on android,
Here is the code: