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

[BUG]: shutter color transparent does not work when the video is mounted #4332

Open
quangtuan28200 opened this issue Dec 11, 2024 · 2 comments

Comments

@quangtuan28200
Copy link

quangtuan28200 commented Dec 11, 2024

Version

6.8.2

What platforms are you having the problem on?

Android

System Version

android 14

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

I'm using react-native 0.74.3, shutter color transparent does not work when the video is mounted but work with color

Reproduction Link

none

Reproduction

with transparent, shutter color is black when the video is mounted

media_20241211_232857_2135437438633459419.mp4

with blue, shutter color work perfectly

media_20241211_232857_2557233646497339170.mp4

here is my code:

const [open, setopen] = useState(false);
const [isLoadingVideo, setIsLoadingVideo] = useState(true);
const videoref = useRef<VideoRef>(null);

return (
<View style={{ paddingTop: 100, height: 600 }}>
	<Button
		title="TOGGLE"
		onPress={() => {
			setopen(prev => !prev);
			setIsLoadingVideo(true);
		}}
	/>
	<Button
		title="NEXT"
		onPress={() => {
			setIsLoadingVideo(true);
			videoref.current?.setSource({ uri: 'https://videos.pexels.com/video-files/5752729/5752729-uhd_2560_1440_30fps.mp4' });
		}}
	/>
	<Button
		title="PREV"
		onPress={() => {
			setIsLoadingVideo(true);
			videoref.current?.setSource({ uri: 'https://videos.pexels.com/video-files/3195394/3195394-uhd_2560_1440_25fps.mp4' });
		}}
	/>
	{open && (
		<View style={{ justifyContent: 'center', alignItems: 'center' }}>
			<Video
				ref={videoref}
				viewType={ViewType.SURFACE}
				style={{ width: '100%', aspectRatio: 16 / 9 }}
				source={{ uri: 'https://videos.pexels.com/video-files/3195394/3195394-uhd_2560_1440_25fps.mp4' }}
				shutterColor="transparent" // blue
				onReadyForDisplay={() => setIsLoadingVideo(false)}
			/>

			{isLoadingVideo && <ActivityIndicator style={{ position: 'absolute' }} size="large" color={COLORS.RED} />}
		</View>
	)}
</View>
);
Copy link

github-actions bot commented Dec 11, 2024

Previous bot comment (click to expand)

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • what happened?

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

Copy link

Thank you for your bug report. We will review it and get back to you if we need more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant