Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken page on changing the orientation while playing in full screen mode #1645

Closed
akhilsanker opened this issue Jul 2, 2019 · 12 comments
Closed
Labels
stale Closed due to inactivity or lack or resources

Comments

@akhilsanker
Copy link

Bug

The screen is completely broken on changing the device orientation, while playing the video in full screen mode.

Screen Recording 2019-06-26 at 11 07 49 AM (1)

Environment info

React native info output:

  react: 16.8.3 
  react-native: 0.59.8 

Library version: react-native-video: 4.4.1

Steps To Reproduce

  1. Play the video in full screen mode.
  2. While playing, change the device orientation.
  3. Close the video, with the close button control, and the page will be broken.
    ...

Describe what you expected to happen:

  1. Not to break the screen while changing the orientation.

Reproducible sample code

		<SafeAreaView style={{flex: 1, backgroundColor: '#fff'}}>
			<HeaderRootComponent title={language.studentSupport} />
			<Container>
				<Content>
					<List>
						<ListItem itemDivider>
							<View style={style.listHeaderWrapper}>
								<Icon name='videocam' style={{fontSize: 25}}/>
								<View style={style.listTextWrapper}>
									<Text>{language.videoText}</Text>
								</View>
							</View>
						</ListItem>                    
						<ListItem>
							<Video source ={{uri: language.videoUrl}}
								poster = {language.videoThumbUrl}
								ref={(ref) => {this.player = ref}}   
								repeat= {true}
								resizeMode= {"cover"}
								posterResizeMode = {"cover"}
								paused={this.state.isPaused}
								style={style.backgroundVideo} />
						</ListItem>
					</List>
				</Content>
			</Container>
		</SafeAreaView>

Thanks

@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Jul 2, 2019

Are you handling onLayout?
If you don't enter fullscreen and rotate, the page behaves well? (A video of this scenario will be cool)

@akhilsanker
Copy link
Author

Hi @CHaNGeTe ,

Not handling onLayout.
Its working fine in normal mode, without entering in full screen mode.

without full screen mode

Thanks

@jonathangreco
Copy link

This bug is already known here #1319

@ashnfb already provided a fix for this on his repository. But the video still broke the layout if inside a scrollView.

That's the current state of this bug.

We need the help of @cobarx now to fix the Video inside a ScrollView Component

@akhilsanker
Copy link
Author

Hi @jonathangreco ,

But the layout is breaking even if it is outside scrollview.

Thanks

@jonathangreco
Copy link

jonathangreco commented Jul 3, 2019

@ashnfb In the meantime, do we have a props to disable fullscreen button for iOS ? Can't go to production with this...

And I just decided to use 'react-native-video' for controls now since it's also available with android. I really hope that we can fix this quick now. I'm not sure fullscreen on iOS is mandatory (could be a boolean on props) since it's broke the layout for everyone.

@jonathangreco
Copy link

@akhilsanker Yes, it does break the layout, read again what I wrote.

@ashnfb fixed this on his repository (a fork of this repo)... It's not merged yet.

@akhilsanker
Copy link
Author

akhilsanker commented Jul 3, 2019

Hi @jonathangreco ,

Do you have any workaround to solve this issue temporarily?

Thanks

@jonathangreco
Copy link

jonathangreco commented Jul 3, 2019

@akhilsanker No.

Edit : A workaround is possible ? See #1319

@ashnfb
Copy link
Contributor

ashnfb commented Jul 3, 2019

@ashnfb In the meantime, do we have a props to disable fullscreen button for iOS ? Can't go to production with this...

And I just decided to use 'react-native-video' for controls now since it's also available with android. I really hope that we can fix this quick now. I'm not sure fullscreen on iOS is mandatory (could be a boolean on props) since it's broke the layout for everyone.

@jonathangreco agreed. Let me see about adding a props for hiding the button. It's unfortunate, but this is due to using legacy APIs for displaying fullscreen content. Upgrading to newer APIs is a bigger undertaking. I will post updates about the fullscreen button in #1319

@akhilsanker
Copy link
Author

Hi @cobarx ,
Any solution?

Thanks

@mehthabux
Copy link

any luck ?

@hueniverse hueniverse added the stale Closed due to inactivity or lack or resources label Apr 22, 2022
@jwillingham789
Copy link

I'm still getting this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Closed due to inactivity or lack or resources
Projects
None yet
Development

No branches or pull requests

7 participants