We recommend 16:9 players be at least 480 pixels wide and 270 pixels tall.Īny web page that uses the IFrame API must also implement the following JavaScript function: If the player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size. Most modern browsers support postMessage.Įmbedded players must have a viewport that is at least 200px by 200px. The user's browser must support the HTML5 postMessage feature. It also details the different JavaScript functions that you can call to control the video player as well as the player parameters you can use to further customize the player. It identifies the different types of events that the API can send and explains how to write event listeners to respond to those events. This guide explains how to use the IFrame API. You can also add event listeners that will execute in response to certain player events, such as a player state change. Using the API's JavaScript functions, you can queue videos for playback play, pause, or stop those videos adjust the player volume or retrieve information about the video being played. The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |