I’ve seen this exact thing done. I just can’t seem to figure it all out.
Lets say I am working on website.com
-
What I would like to do is take any random youtube video url let’s say youtube.com/watch?v=kffacxfA7G4
-
Have the user replace “youtube.com” in the url with “website.com”
-
Have the video play within website.com/watch?v=kffacxfA7G4
Thanks
I want the video to play in an an embedded player within myexample.com, but pull the video to be played from the url.
example: myexample.com/watch=VIDEOID
Take any embed code from youtube, just make the video id to appear dynamic based on your VIDEOID parameter.
<iframe width=“425” height=“349” src=“http://www.youtube.com/embed/<?php echo strip_tags($_REQUEST[‘VIDEOID’]); ?>” frameborder=“0” allowfullscreen></iframe>
website.com/watch.php?VIDEOID=kffacxfA7G4
With old embed code, there are some author restrictions not to play outside youtube. But now with this iframe embed code, most of the videos are working well.