You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Thanks for this custom element.
I am adapting the javacript code to a lit component that uses typescript.
I have installed @types/youtube , and I am getting the following error:
Property 'ready' does not exist on type 'typeof YT'.
paulirish
changed the title
Property 'ready' does not exist on type 'typeof YT'.
Types: Property 'ready' does not exist on type 'typeof YT'.
Mar 3, 2024
TLDR: the script uses YT.ready() as a mechanism to resolve our ytApiPromise. However that's an undocumented API (not in docs and not in types).
We should use a window.onYouTubeIframeAPIReady global to get back on supported APIs.
But.. when we do that we'll have to ensure the system works with multiple embed that can technically race to fetch the iframe API. Will need a demo page with two embed that start loading at the same time.
Hello. Thanks for this custom element.
I am adapting the javacript code to a lit component that uses typescript.
I have installed @types/youtube , and I am getting the following error:
The error arises from this fragment:
I have looked up on the youtube type definition, and in fact, I don't find
ready
:https://www.npmjs.com/package/@types/youtube?activeTab=code
Is maybe your code outdated?
Thanks in advance.
The text was updated successfully, but these errors were encountered: