Answer the question
In order to leave comments, you need to log in
How to get data about a video file from YouTube (name, duration, etc.)?
Greetings
I am adding a video to a page from YouTube and its markup. I have two options:
Option 1
Manually add the HTML markup of the YouTube roll to the HTML:
<div itemscope itemtype="http://schema.org/VideoObject">
<h2 itemprop="name">111</h2><br>
<span itemprop="description">333</span>
<link itemprop="url" href="https://www.youtube.com/watch?v=8Ka4eKyDkxc">
<meta itemprop="duration" content="PT6M58S">
и так далее
Answer the question
In order to leave comments, you need to log in
Use Youtube's API. The link has been sent to you above. Connect the api and have access to all player events, the start of viewing, the current time, the end of the video, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question