Is it possible to listen for when the chromecast plugin connects with a device for use with the Youtube JS API?

非 Y 不嫁゛ 提交于 2019-12-24 01:44:29

问题


I have a webpage that uses the iframe Youtube player api. I'd like to give the user the ability to Chromecast the currently loaded Youtube video.

I've been looking through the Chromecast sender guide. I'm only seeing how to get the session and receiver objects if the user first calls the chrome.cast.requestSession(onRequestSessionSuccess, onLaunchError) function by clicking a button that I create on the page.

Is there a way to get the session and receiver objects if they clicked on the Youtube player/Chrome extension button to connect to a device, and not the button I provide?

Thanks!

来源:https://stackoverflow.com/questions/24939094/is-it-possible-to-listen-for-when-the-chromecast-plugin-connects-with-a-device-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!