videojs / videojs-youtube

YouTube playback technology for Video.js
1.13k stars 549 forks source link

How to interact with YT API? #542

Closed Guite closed 4 years ago

Guite commented 5 years ago

I think when video.js is used for YT videos then it is not recommended to use the YT API directly (method onYouTubeIframeAPIReady), right? Is there any example available for how to interact with the YouTube player correctly? Is it somehow possible to access this.ytPlayer from the player? Or what is the preferred way to go?

gkatsev commented 4 years ago

You could access it via player.tech().ytPlayer, I think. Though, any particular reason? Anything that you need that this plugin doesn't provide? Should the plugin provide it? We do try to recommend against touching stuff on the tech.

Guite commented 4 years ago

Not sure yet. I am implementing a system for uploading videos from a website into a YouTube channel, mark them as private, persist the YouTube ID and embed them on the website again later. Probably there is no special integration required through video.js. Will have the proof of concept ready in a few days and report back.

Guite commented 4 years ago

Closing as unneeded. Thanks.