javascript - Can i use youtube api with Iframe without using Iframe id to get palying status? -
Can I use the YouTube API without using an iframe ID to get a pirgling status? I want to use video ID instead of Iphone ID.
When your player object is set, you first have the parameter as either:
1) element id (if it is already embedded, or iframe of any other element if you are replacing an element on the page with your player) or 2) a dom node Represents the element.
So if you do not have IFreame ID, then you have to use some method to identify the DOM node ... whether it's with the jQuery selector, parsing element source attributes with Regex, In any case, there is no disclosure of only passing in a video ID and Player APIs have to find the video ID that is to outsource that video ID; You have to write such a function yourself.
Comments
Post a Comment