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

[expo-video] I can't use youtube urls to show videos in my app #29098

Closed
eliasg52 opened this issue May 24, 2024 · 1 comment
Closed

[expo-video] I can't use youtube urls to show videos in my app #29098

eliasg52 opened this issue May 24, 2024 · 1 comment
Labels
incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues

Comments

@eliasg52
Copy link

eliasg52 commented May 24, 2024

Minimal reproducible example

.

What platform(s) does this occur on?

Android, iOS

Did you reproduce this issue in a development build?

Yes

Summary

if I use this url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' as videosource provided in expo-video example: https://docs.expo.dev/versions/latest/sdk/video/
The video works and displays correctly, however if I use, for example, a YouTube url: 'https://www.youtube.com/watch?v=LXb3EKWsInQ&t=197s&ab_channel=Jacob%2BKatieSchwarz' the video displays all black with a time 00:00 and I can't take any action. I don't have any error messages anywhere. I don't know if it is my mistake or URLs from YouTube or other media are not accepted and it is not clarified in the documentation. thank you so much!

const VideoPlayer = () => {
const ref = useRef(null);
const [isPlaying, setIsPlaying] = useState(true);
const player = useVideoPlayer(
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
(player) => {
player.play();
}
);

useEffect(() => {
const subscription = player.addListener('playingChange', (isPlaying) => {
setIsPlaying(isPlaying);
});

return () => {
  subscription.remove();
};

}, [player]);

return (
<>


<Button
title={isPlaying ? 'Pause' : 'Play'}
onPress={() => {
if (isPlaying) {
player.pause();
} else {
player.play();
}
setIsPlaying(!isPlaying);
}}
/>

</>
);
};

export default VideoPlayer;

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.4
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.7.1 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.2.1 - /opt/homebrew/bin/npm
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
Android SDK:
API Levels: 33, 34
Build Tools: 30.0.3, 33.0.0, 33.0.1, 34.0.0
System Images: android-33 | Google APIs ARM 64 v8a, android-34 | Google APIs ARM 64 v8a, android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a, android-UpsideDownCakePrivacySandbox | Google Play Intel x86_64 Atom
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode: 15.4/15F31d - /usr/bin/xcodebuild
npmPackages:
expo: ~51.0.7 => 51.0.8
expo-router: ~3.5.14 => 3.5.14
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
react-native-web: ~0.19.10 => 0.19.11
Expo Workflow: bare

Expo Doctor Diagnostics

(node:49429) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for issues with metro config
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check native tooling versions
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

@eliasg52 eliasg52 added the needs validation Issue needs to be validated label May 24, 2024
@expo-bot expo-bot added incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues and removed needs validation Issue needs to be validated labels May 24, 2024
@expo-bot
Copy link
Collaborator

Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.

The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.

A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.

Resources

Common concerns

"I've only been able to reproduce it in private, proprietary code"

You may not have spent enough time narrowing down the root cause of the issue. Try out the techniques discussed in this manual debugging guide to learn how to isolate the problem from the rest of your codebase.

"I didn't have time to create one"

That's understandable, it can take some time to prepare. We ask that you hold off on filing an issue until you are able to fully complete the required fields in the issue template.

"You can reproduce it by yourself by creating a project and following these steps"

This is useful knowledge, but it's still valuable to have the resulting project that is produced from running the steps, where you have verified you can reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues
Projects
None yet
Development

No branches or pull requests

2 participants