To play YouTube videos in the background while doing other things on your iPhone, you can use YouTube premium or Safari's desktop view mode.
To embed a Vimeo video onto another webpage, you'll need to copy and paste the video's unique embed code.