Is there a trick to forcing a redirect to open a YouTube video link in the YouTube app on a mobile device?
Say I have a YouTube link:
https://youtu.be/my-video-id
And I want to create a redirect so that
https://mydomain.com/video
automatically redirects to https://youtu.be/my-video-id
and opens in the YouTube app.
I’m trying the PHP code:
<?php header("Location: https://youtu.be/my-video-id"); ?>
But that does not seem to work. It opens the mobile YouTube site with the video.
This is on Android using the mobile Chrome browser. I’d kind of like to solve this on iOS devices as well, but for now I’m just looking at Android devices - because that’s what I have.
If I create a link:
<a href="https://youtu.be/my-video-id">Click Here</a>
and then click the link - the video opens in the YouTube app. But redirecting doesn’t appear to be possible. Am I missing something? Or is this just no possible?