I am trying to include YouTube video by object
tag in HTML:
<object width="500" height="500" data="https://www.youtube.com/watch?v=aqsL0QQaSP4"></object>
Currently, the video doesn't display. I searched on W3Schools, they have similar code with a different URL and it works:
<object width="420" height="315"
data="https://www.youtube.com/v/XGSy3_Czz8k">
</object>
What kind of URL can I use for the object
data
attribute?
Figured it out. You need to add a "v/" to the end of youtube.com. Basically, the new video link that you embed is https://www.youtube.com/v/watch?v=aqsL0QQaSP4
<object width="420" height="315"
data="https://www.youtube.com/v/watch?v=aqsL0QQaSP4">
</object>