+ 3
Embedding a YouTube video on an iPhone
Does anyone know how to embed a video from YouTube on an iPhone/iPad
1 Answer
+ 3
To embed YouTube videos use:
<body>
   [...]
   <iframe src="https://www.youtube.com/embed/[YouTube video ID]"></iframe>
   [...]
<body>
To make the video frame scale better to screens of different sizes, add:
<head>
   [...]
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   [...]
<head>
and
<iframe width="100%" height="100%" [...]></iframe>
To remove the border around the frame add:
<iframe style="border: none" [...]></iframe>
More info:
https://www.w3schools.com/html/html_youtube.asp
Example code:
https://code.sololearn.com/WbYP9W7ktcl7/?ref=app