Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fullscreen android forces re-rendering #358

Open
@dpoqramGTI

Description

Describe the bug
Pressing on fullscreen button forces re-rendering

WhatsApp.Video.2024年10月19日.at.13.13.31.mp4

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>
 );
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /