এই পাতায় ইউটিউব আইফ্রেম প্লেয়ার এপিআই-এর পরিবর্তন এবং ডকুমেন্টেশনের হালনাগাদ তালিকাভুক্ত করা হয়েছে। এই চেঞ্জলগটি সাবস্ক্রাইব করুন । 
July 9, 2025
The onError event API has been updated with a new error code 153 .
Error 153 indicates the request does not include the HTTP Referer header or equivalent API Client identification.
See API Client Identity and Credentials for more information.
June 24, 2024
The documentation has been updated to note that YouTube has extended the Android WebView Media Integrity API to enable embedded media players, including YouTube player embeds in Android applications, to verify the embedding app's authenticity. With this change, embedding apps automatically send an attested app ID to YouTube.
November 20, 2023
The new onAutoplayBlocked event API is now available.
This event notifies your application if the browser blocks autoplay or scripted playback.
Verification of autoplay success or failure is an
established paradigm
for HTMLMediaElements, and the onAutoplayBlocked event now provides similar
functionality for the IFrame Player API.
April 27, 2021
The Getting Started and Loading a Video Player sections have been updated to include examples of using a playerVars object to customize the player.
October 13, 2020
Note: This is a deprecation announcement for the embedded player
functionality that lets you configure the player to load search results. This announcement affects
the IFrame Player API's queueing functions for lists ,
cuePlaylist and
loadPlaylist .
This change will become effective on or after cuePlaylist or loadPlaylist functions that set the listType
property to search will generate a 4xx response code, such as
404 ( Not Found ) or 410 ( Gone ). This change
also affects the list property for those functions as that property no longer
supports the ability to specify a search query.
As an alternative, you can use the YouTube Data API's
search.list method to retrieve search
results and then load selected videos in the player.
October 24, 2019
The documentation has been updated to reflect the fact that the API no longer supports functions for setting or retrieving playback quality. As explained in this YouTube Help Center article , to give you the best viewing experience, YouTube adjusts the quality of your video stream based on your viewing conditions.
The changes explained in the following list have been in effect for more than one year. This update merely aligns the documentation with current functionality:
- The
getPlaybackQuality,setPlaybackQuality, andgetAvailableQualityLevelsfunctions are no longer supported. In particular, calls tosetPlaybackQualitywill be no-op functions, meaning they will not actually have any impact on the viewer's playback experience. - The queueing functions for videos and playlists --
cueVideoById,loadVideoById, etc. -- no longer support thesuggestedQualityargument. Similarly, if you call those functions using object syntax, thesuggestedQualityfield is no longer supported. IfsuggestedQualityis specified, it will be ignored when the request is handled. It will not generate any warnings or errors. - The
onPlaybackQualityChangeevent is still supported and might signal a change in the viewer's playback environment. See the Help Center article referenced earlier for more information about factors that affect playback conditions or that might cause the event to fire.
May 16, 2018
The API now supports features that allow users (or embedders) to control the viewing perspective for 360° videos :
- The
getSphericalPropertiesfunction retrieves the current orientation for the video playback. The orientation includes the following data:- yaw - represents the horizontal angle of the view in degrees, which reflects the extent to which the user turns the view to face further left or right
- pitch - represents the vertical angle of the view in degrees, which reflects the extent to which the user adjusts the view to look up or down
- roll - represents the rotational angle (clockwise or counterclockwise) of the view in degrees.
- fov - represents the field-of-view of the view in degrees, which reflects the extent to which the user zooms in or out on the video.
- The
setSphericalPropertiesfunction modifies the view to match the submitted property values. In addition to the orientation values described earlier, this function supports a Boolean field that indicates whether the IFrame embed should respond toDeviceOrientationEventson supported mobile devices.
This example demonstrates and lets you test these new features.
June 19, 2017
This update contains the following changes:
-
Documentation for the YouTube Flash Player API and YouTube JavaScript Player API has been removed and redirected to this document. The deprecation announcement for the Flash and JavaScript players was made on January 27, 2015. If you haven't done so already, migrate your applications to use IFrame embeds and the IFrame Player API.
August 11, 2016
This update contains the following changes:
-
The newly published YouTube API Services Terms of Service ("the Updated Terms"), discussed in detail on the YouTube Engineering and Developers Blog , provides a rich set of updates to the current Terms of Service. In addition to the Updated Terms , which will go into effect as of February 10, 2017, this update includes several supporting documents to help explain the policies that developers must follow.
The full set of new documents is described in the revision history for the Updated Terms . In addition, future changes to the Updated Terms or to those supporting documents will also be explained in that revision history. You can subscribe to an RSS feed listing changes in that revision history from a link in that document.
June 29, 2016
This update contains the following changes:
-
The documentation has been corrected to note that the
onApiChangemethod provides access to thecaptionsmodule and not theccmodule.
June 24, 2016
The Examples section has been updated to include an example that demonstrates how to use the API with an existing <iframe> element.
January 6, 2016
The clearVideo function has been deprecated and removed from the documentation. The function no longer has any effect in the YouTube player.
December 18, 2015
European Union (EU) laws require that certain disclosures must be given to and consents obtained from end users in the EU. Therefore, for end users in the European Union, you must comply with the EU User Consent Policy . We have added a notice of this requirement in our YouTube API Terms of Service .
April 28, 2014
This update contains the following changes:
-
The new removeEventListener function lets you remove a listener for a specified event.
March 25, 2014
This update contains the following changes:
-
The Requirements section has been updated to note that embedded players must have a viewport that is at least 200px by 200px. If a player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size. We recommend 16:9 players be at least 480 pixels wide and 270 pixels tall.
July 23, 2013
This update contains the following changes:
-
The Overview now includes a video of a 2011 Google I/O presentation that discusses the iframe player.
October 31, 2012
This update contains the following changes:
-
The Queueing functions section has been updated to explain that you can use either argument syntax or object syntax to call all of those functions. Note that the API may support additional functionality in object syntax that the argument syntax does not support.
In addition, the descriptions and examples for each of the video queueing functions have been updated to reflect the newly added support for object syntax. (The API's playlist queueing functions already supported object syntax.)
-
When called using object syntax, each of the video queueing functions supports an
endSecondsproperty, which accepts a float/integer and specifies the time when the video should stop playing whenplayVideo()is called. -
The
getVideoStartBytesmethod has been deprecated. The method now always returns a value of0.
August 22, 2012
This update contains the following changes:
-
The example in the Loading a video player section that demonstrates how to manually create the
<iframe>tag has been updated to include a closing</iframe>tag since theonYouTubeIframeAPIReadyfunction is only called if the closing</iframe>element is present.
August 6, 2012
This update contains the following changes:
-
The Operations section has been expanded to list all of the supported API functions rather than linking to the JavaScript Player API Reference for that list.
-
The API supports several new functions and one new event that can be used to control the video playback speed:
-
Functions
getAvailablePlaybackRates– Retrieve the supported playback rates for the cued or playing video. Note that variable playback rates are only supported in the HTML5 player.getPlaybackRate– Retrieve the playback rate for the cued or playing video.setPlaybackRate– Set the playback rate for the cued or playing video.
-
Events
onPlaybackRateChange– This event fires when the video's playback rate changes.
-
July 19, 2012
This update contains the following changes:
-
The new
getVideoLoadedFractionmethod replaces the now-deprecatedgetVideoBytesLoadedandgetVideoBytesTotalmethods. The new method returns the percentage of the video that the player shows as buffered. -
The
onErrorevent may now return an error code of5, which indicates that the requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred. -
The Requirements section has been updated to indicate that any web page using the IFrame API must also implement the
onYouTubeIframeAPIReadyfunction. Previously, the section indicated that the required function was namedonYouTubePlayerAPIReady. Code samples throughout the document have also been updated to use the new name.Note: To ensure that this change does not break existing implementations, both names will work. If, for some reason, your page has an
onYouTubeIframeAPIReadyfunction and anonYouTubePlayerAPIReadyfunction, both functions will be called, and theonYouTubeIframeAPIReadyfunction will be called first. -
The code sample in the Getting started section has been updated to reflect that the URL for the IFrame Player API code has changed to
http://www.youtube.com/iframe_api. To ensure that this change does not affect existing implementations, the old URL (http://www.youtube.com/player_api) will continue to work.
July 16, 2012
This update contains the following changes:
-
The Operations section now explains that the API supports the
setSize()anddestroy()methods. ThesetSize()method sets the size in pixels of the<iframe>that contains the player and thedestroy()method removes the<iframe>.
June 6, 2012
This update contains the following changes:
-
We have removed the
experimentalstatus from the IFrame Player API. -
The Loading a video player section has been updated to point out that when inserting the
<iframe>element that will contain the YouTube player, the IFrame API replaces the element specified in the constructor for the YouTube player. This documentation change does not reflect a change in the API and is intended solely to clarify existing behavior.In addition, that section now notes that the insertion of the
<iframe>element could affect the layout of your page if the element being replaced has a different display style than the inserted<iframe>element. By default, an<iframe>displays as aninline-blockelement.
March 30, 2012
This update contains the following changes:
-
The Operations section has been updated to explain that the IFrame API supports a new method,
getIframe(), which returns the DOM node for the IFrame embed.
March 26, 2012
This update contains the following changes:
-
The Requirements section has been updated to note the minimum player size.
এই পাতায় ইউটিউব আইফ্রেম প্লেয়ার এপিআই-এর পরিবর্তন এবং ডকুমেন্টেশনের হালনাগাদ তালিকাভুক্ত করা হয়েছে। এই চেঞ্জলগটি সাবস্ক্রাইব করুন । 
July 9, 2025
The onError event API has been updated with a new error code 153 .
Error 153 indicates the request does not include the HTTP Referer header or equivalent API Client identification.
See API Client Identity and Credentials for more information.
June 24, 2024
The documentation has been updated to note that YouTube has extended the Android WebView Media Integrity API to enable embedded media players, including YouTube player embeds in Android applications, to verify the embedding app's authenticity. With this change, embedding apps automatically send an attested app ID to YouTube.
November 20, 2023
The new onAutoplayBlocked event API is now available.
This event notifies your application if the browser blocks autoplay or scripted playback.
Verification of autoplay success or failure is an
established paradigm
for HTMLMediaElements, and the onAutoplayBlocked event now provides similar
functionality for the IFrame Player API.
April 27, 2021
The Getting Started and Loading a Video Player sections have been updated to include examples of using a playerVars object to customize the player.
October 13, 2020
Note: This is a deprecation announcement for the embedded player
functionality that lets you configure the player to load search results. This announcement affects
the IFrame Player API's queueing functions for lists ,
cuePlaylist and
loadPlaylist .
This change will become effective on or after cuePlaylist or loadPlaylist functions that set the listType
property to search will generate a 4xx response code, such as
404 ( Not Found ) or 410 ( Gone ). This change
also affects the list property for those functions as that property no longer
supports the ability to specify a search query.
As an alternative, you can use the YouTube Data API's
search.list method to retrieve search
results and then load selected videos in the player.
October 24, 2019
The documentation has been updated to reflect the fact that the API no longer supports functions for setting or retrieving playback quality. As explained in this YouTube Help Center article , to give you the best viewing experience, YouTube adjusts the quality of your video stream based on your viewing conditions.
The changes explained in the following list have been in effect for more than one year. This update merely aligns the documentation with current functionality:
- The
getPlaybackQuality,setPlaybackQuality, andgetAvailableQualityLevelsfunctions are no longer supported. In particular, calls tosetPlaybackQualitywill be no-op functions, meaning they will not actually have any impact on the viewer's playback experience. - The queueing functions for videos and playlists --
cueVideoById,loadVideoById, etc. -- no longer support thesuggestedQualityargument. Similarly, if you call those functions using object syntax, thesuggestedQualityfield is no longer supported. IfsuggestedQualityis specified, it will be ignored when the request is handled. It will not generate any warnings or errors. - The
onPlaybackQualityChangeevent is still supported and might signal a change in the viewer's playback environment. See the Help Center article referenced earlier for more information about factors that affect playback conditions or that might cause the event to fire.
May 16, 2018
The API now supports features that allow users (or embedders) to control the viewing perspective for 360° videos :
- The
getSphericalPropertiesfunction retrieves the current orientation for the video playback. The orientation includes the following data:- yaw - represents the horizontal angle of the view in degrees, which reflects the extent to which the user turns the view to face further left or right
- pitch - represents the vertical angle of the view in degrees, which reflects the extent to which the user adjusts the view to look up or down
- roll - represents the rotational angle (clockwise or counterclockwise) of the view in degrees.
- fov - represents the field-of-view of the view in degrees, which reflects the extent to which the user zooms in or out on the video.
- The
setSphericalPropertiesfunction modifies the view to match the submitted property values. In addition to the orientation values described earlier, this function supports a Boolean field that indicates whether the IFrame embed should respond toDeviceOrientationEventson supported mobile devices.
This example demonstrates and lets you test these new features.
June 19, 2017
This update contains the following changes:
-
Documentation for the YouTube Flash Player API and YouTube JavaScript Player API has been removed and redirected to this document. The deprecation announcement for the Flash and JavaScript players was made on January 27, 2015. If you haven't done so already, migrate your applications to use IFrame embeds and the IFrame Player API.
August 11, 2016
This update contains the following changes:
-
The newly published YouTube API Services Terms of Service ("the Updated Terms"), discussed in detail on the YouTube Engineering and Developers Blog , provides a rich set of updates to the current Terms of Service. In addition to the Updated Terms , which will go into effect as of February 10, 2017, this update includes several supporting documents to help explain the policies that developers must follow.
The full set of new documents is described in the revision history for the Updated Terms . In addition, future changes to the Updated Terms or to those supporting documents will also be explained in that revision history. You can subscribe to an RSS feed listing changes in that revision history from a link in that document.
June 29, 2016
This update contains the following changes:
-
The documentation has been corrected to note that the
onApiChangemethod provides access to thecaptionsmodule and not theccmodule.
June 24, 2016
The Examples section has been updated to include an example that demonstrates how to use the API with an existing <iframe> element.
January 6, 2016
The clearVideo function has been deprecated and removed from the documentation. The function no longer has any effect in the YouTube player.
December 18, 2015
European Union (EU) laws require that certain disclosures must be given to and consents obtained from end users in the EU. Therefore, for end users in the European Union, you must comply with the EU User Consent Policy . We have added a notice of this requirement in our YouTube API Terms of Service .
April 28, 2014
This update contains the following changes:
-
The new removeEventListener function lets you remove a listener for a specified event.
March 25, 2014
This update contains the following changes:
-
The Requirements section has been updated to note that embedded players must have a viewport that is at least 200px by 200px. If a player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size. We recommend 16:9 players be at least 480 pixels wide and 270 pixels tall.
July 23, 2013
This update contains the following changes:
-
The Overview now includes a video of a 2011 Google I/O presentation that discusses the iframe player.
October 31, 2012
This update contains the following changes:
-
The Queueing functions section has been updated to explain that you can use either argument syntax or object syntax to call all of those functions. Note that the API may support additional functionality in object syntax that the argument syntax does not support.
In addition, the descriptions and examples for each of the video queueing functions have been updated to reflect the newly added support for object syntax. (The API's playlist queueing functions already supported object syntax.)
-
When called using object syntax, each of the video queueing functions supports an
endSecondsproperty, which accepts a float/integer and specifies the time when the video should stop playing whenplayVideo()is called. -
The
getVideoStartBytesmethod has been deprecated. The method now always returns a value of0.
August 22, 2012
This update contains the following changes:
-
The example in the Loading a video player section that demonstrates how to manually create the
<iframe>tag has been updated to include a closing</iframe>tag since theonYouTubeIframeAPIReadyfunction is only called if the closing</iframe>element is present.
August 6, 2012
This update contains the following changes:
-
The Operations section has been expanded to list all of the supported API functions rather than linking to the JavaScript Player API Reference for that list.
-
The API supports several new functions and one new event that can be used to control the video playback speed:
-
Functions
getAvailablePlaybackRates– Retrieve the supported playback rates for the cued or playing video. Note that variable playback rates are only supported in the HTML5 player.getPlaybackRate– Retrieve the playback rate for the cued or playing video.setPlaybackRate– Set the playback rate for the cued or playing video.
-
Events
onPlaybackRateChange– This event fires when the video's playback rate changes.
-
July 19, 2012
This update contains the following changes:
-
The new
getVideoLoadedFractionmethod replaces the now-deprecatedgetVideoBytesLoadedandgetVideoBytesTotalmethods. The new method returns the percentage of the video that the player shows as buffered. -
The
onErrorevent may now return an error code of5, which indicates that the requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred. -
The Requirements section has been updated to indicate that any web page using the IFrame API must also implement the
onYouTubeIframeAPIReadyfunction. Previously, the section indicated that the required function was namedonYouTubePlayerAPIReady. Code samples throughout the document have also been updated to use the new name.Note: To ensure that this change does not break existing implementations, both names will work. If, for some reason, your page has an
onYouTubeIframeAPIReadyfunction and anonYouTubePlayerAPIReadyfunction, both functions will be called, and theonYouTubeIframeAPIReadyfunction will be called first. -
The code sample in the Getting started section has been updated to reflect that the URL for the IFrame Player API code has changed to
http://www.youtube.com/iframe_api. To ensure that this change does not affect existing implementations, the old URL (http://www.youtube.com/player_api) will continue to work.
July 16, 2012
This update contains the following changes:
-
The Operations section now explains that the API supports the
setSize()anddestroy()methods. ThesetSize()method sets the size in pixels of the<iframe>that contains the player and thedestroy()method removes the<iframe>.
June 6, 2012
This update contains the following changes:
-
We have removed the
experimentalstatus from the IFrame Player API. -
The Loading a video player section has been updated to point out that when inserting the
<iframe>element that will contain the YouTube player, the IFrame API replaces the element specified in the constructor for the YouTube player. This documentation change does not reflect a change in the API and is intended solely to clarify existing behavior.In addition, that section now notes that the insertion of the
<iframe>element could affect the layout of your page if the element being replaced has a different display style than the inserted<iframe>element. By default, an<iframe>displays as aninline-blockelement.
March 30, 2012
This update contains the following changes:
-
The Operations section has been updated to explain that the IFrame API supports a new method,
getIframe(), which returns the DOM node for the IFrame embed.
March 26, 2012
This update contains the following changes:
-
The Requirements section has been updated to note the minimum player size.