I want to fetch a YouTube video title when the video id is known, using JavaScript only. Is it possible?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Yes, it is possible using Javascript and JSON.
https://developers.google.com/youtube/2.0/developers_guide_protocol_video_entries
See: https://developers.google.com/youtube/2.0/developers_guide_json
So you do it like this:
And then: