YouTube Live Streaming API - تاریخچه بازبینی

این صفحه فهرستی از تغییرات API پخش زنده یوتیوب و به‌روزرسانی‌های مستندات آن را ارائه می‌دهد. برای دریافت این گزارش تغییرات مشترک شوید .اشتراک

۱۸ آگوست ۲۰۲۶

این به‌روزرسانی شامل تغییرات زیر است:

  • مستندات مربوط به متد liveBroadcasts.update به‌روزرسانی شده است تا خطاهای جدید مربوط به کسب درآمد را شامل شود: preconditionFailed (412) (دلیل: videoNotEligibleForAdsMonetization ) و backendError (503) (دلیل: backendError ).

۱۷ آگوست ۲۰۲۶

این به‌روزرسانی شامل تغییرات زیر است:

  • ویژگی جدید snippet.categoryId در منبع liveBroadcast به شما امکان می‌دهد دسته‌بندی ویدیوی مرتبط با یک پخش زنده را تنظیم، به‌روزرسانی و بازیابی کنید.

۲۰ ژوئیه ۲۰۲۶

این به‌روزرسانی شامل تغییرات زیر است:

۹ ژوئیه ۲۰۲۶

این به‌روزرسانی شامل تغییرات زیر است:

۱ ژوئن ۲۰۲۶

این به‌روزرسانی شامل تغییرات زیر است:

  • ویژگی contentDetails.availabilityConfig از منبع liveBroadcast به شما امکان می‌دهد محدودیت‌های جغرافیایی را برای پخش زنده مشخص کنید تا بتوانید در دسترس بودن منطقه‌ای را برای رویدادهای زنده مدیریت کنید.

۲۶ مارس ۲۰۲۶

این به‌روزرسانی شامل تغییرات زیر است:

  • ویژگی snippet.type اکنون از مقدار جدید giftEvent پشتیبانی می‌کند.

  • ویژگی جدید snippet.giftEventDetails از منبع liveChatMessage و فرزندانش حاوی اطلاعاتی درباره رویداد هدیه هستند.

۱۲ ژانویه ۲۰۲۶

این API اکنون از فعال‌سازی midrolls و درج خودکار midroll برای پخش‌های زنده پشتیبانی می‌کند.

مالک پخش می‌تواند تا زمانی که پخش واجد شرایط پخش در حالت ...

اگر پخش برای میان‌پخش‌ها فعال باشد، صاحب پخش می‌تواند درج خودکار میان‌پخش را فعال کند. همچنین می‌تواند تبلیغات خودکار را برای یک پخش در هر زمان غیرفعال کند.

وقتی مالک پخش، تبلیغات خودکار را فعال می‌کند، می‌تواند یکی از گزینه‌های زیر را انتخاب کند:

  • بگذارید یوتیوب درج میان‌پرده را بهینه کند. این گزینه از سه حالت پشتیبانی می‌کند:
    • پایین: پتانسیل درآمد کمتر، تجربه بیننده کمتر مختل شده
    • متوسط: پتانسیل درآمد متوسط، تجربه بیننده متعادل
    • بالا: پتانسیل درآمد بالاتر، تجربه بیننده با وقفه بیشتر
  • استراتژی و فاصله زمانی برای درج در اواسط رول را به صورت دستی پیکربندی کنید. در این حالت، مالک باید دو پارامتر را تنظیم کند:
    1. استراتژی زمان‌بندی برای نقاط کلیدی تبلیغات. نقاط کلیدی می‌توانند به طور همزمان برای همه بینندگان درج شوند یا زمان‌بندی نقاط کلیدی می‌تواند از بیننده‌ای به بیننده دیگر متفاوت باشد. استراتژی دوم به یوتیوب این امکان را می‌دهد که نقاط کلیدی را با نرخ بالاتری زمان‌بندی کند که به بینندگان اجازه می‌دهد در صورت واجد شرایط بودن، نقاط کلیدی را دریافت کنند.
    2. مدت زمان وقفه بین تبلیغات میان‌پرده.

مستندات، تغییرات API زیر را برای پشتیبانی از این ویژگی نشان می‌دهد:

  • شیء monetizationDetails منبع liveBroadcast شامل فیلدهایی برای فعال‌سازی نمایش در میانه‌ی نمایش و پیکربندی تبلیغات خودکار است.
  • روش update می‌تواند برای فعال یا غیرفعال کردن تبلیغات میان‌برنامه‌ای استفاده شود. این روش همچنین می‌تواند برای تنظیم تبلیغات خودکار برای پخش زنده استفاده شود. این مستندات چندین خطای جدید را که ممکن است هنگام به‌روزرسانی تنظیمات کسب درآمد و تبلیغات خودکار برای پخش زنده رخ دهد، شناسایی می‌کند.

۱۴ ژوئیه ۲۰۲۵

توضیحات متد liveChatMessages.streamList به‌روزرسانی شده است تا راهنمایی در مورد کاربردهای API streamList ارائه دهد.

۹ اکتبر ۲۰۲۳

صرفاً جهت اطلاع، می‌توانید در این فایل CSV ببینید که کدام شناسه‌های استیکر به کدام سوپر استیکرها مربوط می‌شوند. تعاریف ویژگی snippet.superStickerDetails.superStickerMetadata.stickerId از منبع liveChatMessage و ویژگی snippet.superStickerMetadata.stickerId از منبع superChatEvent هر دو به‌روزرسانی شده‌اند تا این اطلاعات را منعکس کنند.

۱۵ سپتامبر ۲۰۲۳

این API اکنون از روش جدیدی برای درج تبلیغات در پخش‌های زنده پشتیبانی می‌کند. علاوه بر liveCuepoints که به شما امکان می‌دهد به صورت دستی تبلیغات کوتاه را در پخش قرار دهید، یوتیوب اکنون از ویژگی‌ای پشتیبانی می‌کند که به طور خودکار تبلیغات کوتاه را در فواصل زمانی ثابت در پخش قرار می‌دهد.

اگر صاحب پخش، تبلیغات خودکار را فعال کند، می‌تواند جنبه‌های زیر از رفتار تبلیغات را مشاهده کند:

  • طول فاصله بین وقفه‌های تبلیغاتی میان‌برنامه.
  • استراتژی زمان‌بندی برای نقاط کلیدی تبلیغات. نقاط کلیدی می‌توانند به طور همزمان برای همه بینندگان درج شوند یا زمان‌بندی نقاط کلیدی می‌تواند از بیننده‌ای به بیننده دیگر متفاوت باشد. استراتژی دوم به یوتیوب این امکان را می‌دهد که نقاط کلیدی را با نرخ بالاتری زمان‌بندی کند که به بینندگان اجازه می‌دهد در صورت واجد شرایط بودن، نقاط کلیدی را دریافت کنند.
  • دوره‌ای که در طول آن تبلیغات میان‌برنامه نمایش داده نمی‌شوند؛ برای این ویژگی، صاحب پخش مشخص می‌کند که درج تبلیغات میان‌برنامه تا زمان خاصی متوقف شود.

مستندات، تغییرات API زیر را برای پشتیبانی از این ویژگی نشان می‌دهد:

  • منبع liveBroadcast اکنون حاوی یک شیء monetizationDetails است. فیلدهای این شیء نشان می‌دهند که آیا درج خودکار آگهی برای پخش فعال است یا خیر و اطلاعات اضافی را برای زمان‌بندی نقاط شروع مشخص می‌کنند.
  • پارامتر part متد liveBroadcast.list از مقدار monetizationDetails پشتیبانی می‌کند.
  • روش update می‌تواند برای مکث درج تبلیغات میان‌برنامه‌ای برای مدت معینی در پخش زنده استفاده شود. مستندات همچنین اکنون چندین خطایی را که ممکن است هنگام به‌روزرسانی جزئیات کسب درآمد برای پخش زنده رخ دهد، شناسایی می‌کند.

۱ آگوست ۲۰۲۳

این به‌روزرسانی شامل تغییرات زیر است:

  • متد liveBroadcasts.update دیگر نیازی به تعیین مقادیر برای این فیلدها ندارد:

    • snippet.title
    • status.privacyStatus

    حذف این فیلدها از درخواست، آنها را بدون تغییر باقی می‌گذارد.

۱ نوامبر ۲۰۲۲

  • روش جدید liveBroadcasts.cuepoint به هر صاحب کانالی که پخش زنده در یوتیوب را اجرا می‌کند، این امکان را می‌دهد که نقاط نشانه‌گذاری (cuepoints) را در آن پخش وارد کند، که می‌تواند باعث ایجاد وقفه‌های تبلیغاتی شود. این روش جایگزین روش liveCuepoints.insert می‌شود که فقط به شرکای محتوای یوتیوب امکان می‌داد نقاط نشانه‌گذاری را در پخش‌های زنده وارد کنند.

    چندین راهنما به‌روزرسانی شده‌اند تا در دسترس بودن این روش جدید را منعکس کنند.

  • توجه: این یک اطلاعیه منسوخ شده است.

    متد liveCuepoints.insert اکنون منسوخ شده است. پشتیبانی از متد liveCuepoints.insert در تاریخ ۱ مه ۲۰۲۳ یا بعد از آن حذف خواهد شد. کاربران API باید برنامه‌های خود را به‌روزرسانی کنند تا به جای آن، متد liveBroadcasts.cuepoint را فراخوانی کنند.

  • مستندات مربوط به متد liveBroadcasts.control حذف شده است. یک اطلاعیه منسوخ شدن برای آن متد در سپتامبر 2020 منتشر شده است.

۱ اکتبر ۲۰۲۲

این به‌روزرسانی شامل تغییرات زیر است:

  • متد liveBroadcasts.update دیگر نیازی به تعیین مقادیر برای این فیلدها ندارد:

    • contentDetails.enableContentEncryption
    • contentDetails.enableDvr
    • contentDetails.enableEmbed
    • contentDetails.recordFromStart
    • contentDetails.startWithSlate

    حذف این فیلدها از درخواست، آنها را بدون تغییر باقی می‌گذارد.

  • مستندات مربوط به فیلدهای منسوخ‌شده‌ی liveBroadcast حذف شد:

    • contentDetails.enableContentEncryption
    • contentDetails.startWithSlate

۱ آوریل ۲۰۲۲

این به‌روزرسانی شامل تغییرات زیر است:

  • ویژگی snippet.type اکنون از دو مقدار جدید پشتیبانی می‌کند:

    • membershipGiftingEvent
    • giftMembershipReceivedEvent
  • ویژگی جدید snippet.membershipGiftingDetails از منبع liveChatMessage و فرزندانش حاوی اطلاعاتی درباره رویداد Membership Gifting هستند. به طور مشابه، ویژگی جدید snippet.giftMembershipReceivedDetails و فرزندانش حاوی اطلاعاتی درباره رویداد Gift Membership Received هستند.

۱۵ سپتامبر ۲۰۲۱

این به‌روزرسانی شامل تغییرات زیر است:

  • ویژگی snippet.type اکنون از دو مقدار جدید پشتیبانی می‌کند:

    • newSponsorEvent
    • memberMilestoneChatEvent
  • ویژگی جدید snippet.memberMilestoneChatDetails از منبع liveChatMessage و فرزندانش حاوی اطلاعاتی در مورد رویداد Member Milestone Chat هستند. به طور مشابه، ویژگی جدید snippet.newSponsorDetails و فرزندانش حاوی اطلاعاتی در مورد رویداد New Sponsor هستند.

۱ دسامبر ۲۰۲۰

متد liveBroadcasts.transition در API از خطای جدید 403 ( Forbidden ) پشتیبانی می‌کند که نشان می‌دهد کاربر درخواست‌های زیادی را در یک بازه زمانی مشخص ارسال کرده است. دلیل خطا userRequestsExceedRateLimit است.

۲۱ سپتامبر ۲۰۲۰

  • تعریف ویژگی status.madeForKids از منبع liveBroadcast به‌روزرسانی شده است تا مشخص شود که این ویژگی فقط خواندنی است. این نشان‌دهنده‌ی تغییر در عملکرد API نیست.

    برای تعیین اینکه یک پخش زنده به صورت child-directed باشد، هنگام فراخوانی متد liveBroadcasts.insert برای ایجاد پخش، ویژگی status.selfDeclaredMadeForKids را روی true تنظیم کنید.

  • توجه: این تغییر شامل یک اطلاعیه منسوخ شدن و به‌روزرسانی اطلاعیه منسوخ شدن قبلی است.

    متد liveBroadcasts.control در تاریخ ۱ اکتبر ۲۰۲۰ یا بعد از آن منسوخ خواهد شد. پس از آن تاریخ، تمام فراخوانی‌های این متد خطای ممنوعه (۴۰۳) را برمی‌گردانند و این متد بعداً به طور کامل حذف خواهد شد. کلاینت‌ها همچنان می‌توانند با اضافه کردن یک پوشش به ویدیوی ارسال شده به سرورهای ورودی یوتیوب، جدول‌بندی خود را پیاده‌سازی کنند.

    تاریخ انقضای اعلام منسوخ شدن که در ۱۶ آوریل ۲۰۲۰ انجام شد و در ابتدا برای ۱ سپتامبر ۲۰۲۰ برنامه‌ریزی شده بود، به تعویق افتاده و اکنون در ۱ اکتبر ۲۰۲۰ یا بعد از آن اتفاق خواهد افتاد. بنابراین، ویژگی‌های موجود در آن اعلام منسوخ شدن و متد liveBroadcasts.control همگی همزمان منسوخ خواهند شد.

۱۷ ژوئیه ۲۰۲۰

توجه: این به‌روزرسانی مربوط به اطلاعیه‌ی منسوخ‌شده‌ی قبلی است.

فیلد cdn.format منبع liveStream که در آوریل ۲۰۱۶ منسوخ شده بود، از ۱۷ آگوست ۲۰۲۰ دیگر پشتیبانی نخواهد شد. درخواست‌هایی که هنوز از آن فیلد استفاده می‌کنند، از آن تاریخ با شکست مواجه خواهند شد.

اگر کد شما هنوز از فیلد cdn.format استفاده می‌کند، باید به‌روزرسانی شود تا نرخ فریم و وضوح تصویر را به‌طور جداگانه، با استفاده از ویژگی‌های cdn.frameRate و cdn.resolution مشخص کند.

۶ ژوئیه ۲۰۲۰

راهنمای « ارائه محتوای زنده یوتیوب از طریق HLS» با چند تغییر به‌روزرسانی شده است:

  • مدت زمان توصیه شده برای یک بخش رسانه‌ای به یک تا چهار ثانیه به‌روزرسانی شده است.
  • بخش جدیدی نحوه دریافت URL HLS Ingestion را از YouTube Creator Studio توضیح می‌دهد.
  • دستورالعمل‌های مربوط به قالب‌بندی مقدار پارامتر file به بخش جدید «تکمیل URL مربوط به HLS Ingestion» منتقل شده‌اند. این دستورالعمل‌ها صرف نظر از اینکه URL مربوط به HLS ingestion از YouTube API یا YouTube Creator Studio دریافت شده باشد، اعمال می‌شوند.

علاوه بر این، مقایسه جدید پروتکل‌های مصرف، پروتکل‌های مصرف پشتیبانی‌شده توسط یوتیوب، کدک‌های پشتیبانی‌شده برای هر پروتکل و اطلاعات اضافی در مورد موارد استفاده مناسب برای هر پروتکل را فهرست می‌کند.

۱۶ آوریل ۲۰۲۰

این به‌روزرسانی شامل یک ویژگی جدید و یک اعلامیه منسوخ شدن است:

  • منبع liveBroadcast اکنون از ویژگی contentDetails.enableAutoStop پشتیبانی می‌کند. این ویژگی نشان می‌دهد که آیا پخش باید حدود یک دقیقه پس از اینکه صاحب کانال پخش ویدیو را در جریان ویدیوی محدود شده متوقف کرد، به طور خودکار متوقف شود یا خیر.

    بخش « طول عمر یک سند پخش » به‌روزرسانی شده است تا توضیح دهد که چگونه فرآیند گام به گام ایجاد و مدیریت یک رویداد زنده یوتیوب در صورت تنظیم ویژگی‌های contentDetails.enableAutoStart یا contentDetails.enableAutoStop روی true تغییر می‌کند.

  • توجه: این یک اطلاعیه منسوخ شدن است. این تغییرات از اول سپتامبر ۲۰۲۰ یا بعد از آن لازم‌الاجرا خواهند شد. تاریخ واقعی اعمال تغییرات در زیر به عنوان تاریخ منسوخ شدن ذکر شده است.

    این به‌روزرسانی یک تغییر بالقوه مخرب را توضیح می‌دهد. این به‌روزرسانی بر برنامه‌های کلاینت API که از منابع پیش‌فرض liveStream و liveBroadcast کانال‌ها برای پخش محتوای زنده در یوتیوب استفاده می‌کنند، تأثیر می‌گذارد. به‌طور خاص، شناسه پخش و شناسه جریان مرتبط با پخش و جریان دائمی دیگر برای شروع پخش‌های جدید عمل نخواهند کرد.

    در صورت صحت هر یک از موارد زیر، درخواست شما تحت تأثیر قرار خواهد گرفت:

    • مقدار ویژگی isDefaultBroadcast منبع liveBroadcast را بررسی می‌کند. این ویژگی پس از تاریخ انقضا بازگردانده نخواهد شد.
    • مقدار ویژگی isDefaultStream منبع liveStream را بررسی می‌کند. این ویژگی پس از تاریخ انقضا بازگردانده نخواهد شد.
    • این متد liveBroadcasts.list را فراخوانی می‌کند و مقدار پارامتر broadcastType را روی persistent یا all تنظیم می‌کند. این پارامتر به عنوان بخشی از این تغییرات منسوخ خواهد شد. از تاریخ منسوخ شدن:
      • اگر مقدار پارامتر broadcastType persistent باشد، آنگاه متد liveBroadcasts.list هیچ نتیجه‌ای را برنمی‌گرداند.
      • اگر مقدار پارامتر broadcastType all باشد، آنگاه متد liveBroadcasts.list پخش‌های پایداری که قبل از آن زمان وجود داشته‌اند را برنمی‌گرداند.

    به عنوان پیش‌زمینه، در چند سال گذشته، یوتیوب به طور خودکار یک جریان پیش‌فرض و یک پخش پیش‌فرض برای یک کانال ایجاد می‌کرد، زمانی که آن کانال برای پخش زنده فعال می‌شد. جریان پیش‌فرض به طور نامحدود وجود داشت، زمان شروع یا پایانی نداشت و قابل حذف نبود. به طور مشابه، پخش پیش‌فرض نیز پایدار در نظر گرفته می‌شد. همیشه وجود داشت و به یک رویداد خاص محدود نمی‌شد.

    از تاریخ منسوخ شدن:

    • یوتیوب دیگر پخش‌ها و استریم‌های پیش‌فرض ایجاد نخواهد کرد. به جای تکیه بر منابع پیش‌فرض، کلاینت‌های API باید بتوانند منابع liveBroadcast و liveStream را ایجاد و مدیریت کنند و این منابع را به هم متصل کنند.
    • اگر پخش پیش‌فرض و پخش جریانی پیش‌فرض یک کانال به طور فعال فعال باشند، به این معنی که کانال در زمان اعمال حذف، از آنها برای پخش زنده استفاده می‌کند، پخش مداوم تحت تأثیر قرار نخواهد گرفت. با این حال، پس از پایان آن پخش، کانال قادر به استفاده مجدد از پخش پیش‌فرض و پخش جریانی پیش‌فرض نخواهد بود.
    • اگر پخش پیش‌فرض و پخش جریانی پیش‌فرض یک کانال به طور فعال پخش نشوند، پس از اجرایی شدن این منسوخ‌سازی، یوتیوب تلاش‌هایی را که برای استفاده از این منابع برای پخش ویدیو انجام می‌شود، نادیده می‌گیرد.

    اگر برنامه شما تحت تأثیر قرار گرفته است، لطفاً به اسناد زیر مراجعه کنید، که به شما کمک می‌کند برنامه خود را به‌روزرسانی کنید تا پس از این تغییر، همچنان مطابق انتظار عمل کند:

    • یک راهنمای مهاجرت جدید سعی دارد مراحلی را که توسعه‌دهندگان ممکن است در کلاینت‌های API که در حال حاضر از پخش‌ها و جریان‌های پیش‌فرض استفاده می‌کنند، توضیح دهد.
    • راهنمای «زندگی یک پخش زنده» شما را با یک فرآیند گام به گام آشنا می‌کند که نحوه ایجاد و مدیریت یک رویداد زنده در یوتیوب را توضیح می‌دهد. هر مرحله، فراخوانی‌های API یا سایر مواردی را که برای انجام یک اقدام خاص باید انجام دهید، توضیح می‌دهد و هنگامی که یوتیوب پشتیبانی از پخش‌ها و استریم‌های پیش‌فرض را متوقف می‌کند، برنامه شما باید آن فرآیند را دنبال کند.

۳۱ مارس ۲۰۲۰

توجه: این یک اطلاعیه منسوخ شده است.

متدهای sponsor resource و sponsors.list منسوخ شده و با متدهای member resource و members.list جایگزین شده‌اند.

متد sponsors.list از تاریخ 30 سپتامبر 2020 یا بعد از آن دیگر پشتیبانی نخواهد شد. کلاینت‌های API باید فراخوانی‌های متد sponsors.list را به‌روزرسانی کنند تا به جای آن از متد members.list استفاده کنند. لطفاً برای اطلاعات بیشتر در مورد منبع جدید ، به تاریخچه ویرایش‌های YouTube Data API مراجعه کنید.

۱۱ مارس ۲۰۲۰

بخش نقطه پایانی مصرف (Ingestion endpoint) در راهنمای « ارائه محتوای زنده یوتیوب از طریق HLS» به‌روزرسانی شده است تا فرآیندی را که یک رمزگذار باید برای تکمیل مقدار پارامتر file= هنگام تشکیل URLهای مصرف اولیه و پشتیبان استفاده کند، روشن کند.

۴ فوریه ۲۰۲۰

راهنمای « ارائه محتوای زنده یوتیوب از طریق HLS» به‌روزرسانی شده است تا توجه داشته باشید که درخواست‌های DELETE اختیاری هستند و نقطه پایانی HLS یوتیوب آنها را نادیده می‌گیرد. به دلایل عملکردی، یوتیوب به مشتریان توصیه می‌کند درخواست‌های DELETE ارسال نکنند.

۱۰ ژانویه ۲۰۲۰

این API اکنون از قابلیت شناسایی محتوای مخصوص کودکان پشتیبانی می‌کند، که یوتیوب آن را «ساخته شده برای کودکان» می‌نامد. برای کسب اطلاعات بیشتر در مورد محتوای «ساخته شده برای کودکان» به مرکز راهنمایی یوتیوب مراجعه کنید.

  • منبع liveBroadcast از دو ویژگی جدید پشتیبانی می‌کند تا تولیدکنندگان محتوا و بینندگان بتوانند محتوای «ساخته شده برای کودکان» را شناسایی کنند:
    • ویژگی selfDeclaredMadeForKids به سازندگان محتوا این امکان را می‌دهد که مشخص کنند آیا یک پخش زنده، محتوای فرزند-محور است یا خیر. این ویژگی را می‌توان هنگام ایجاد یک پخش از طریق متد liveBroadcasts.insert تنظیم کرد. توجه داشته باشید که این ویژگی فقط در پاسخ‌های API که حاوی منابع liveBroadcast هستند، در صورتی که صاحب کانال درخواست API را تأیید کرده باشد، گنجانده می‌شود.
    • ویژگی madeForKids به هر کاربر API این امکان را می‌دهد که وضعیت "made for kids" یک پخش را بازیابی کند. برای مثال، این وضعیت ممکن است بر اساس مقدار ویژگی selfDeclaredMadeForKids تعیین شود. برای اطلاعات بیشتر در مورد تنظیم مخاطب برای کانال، ویدیوها یا پخش‌های خود، به مرکز راهنمای YouTube مراجعه کنید.
  • در API داده یوتیوب، منبع channel از ویژگی‌های جدید selfDeclaredMadeForKids و madeForKids نیز پشتیبانی می‌کند.

ما همچنین شرایط خدمات سرویس‌های YouTube API و سیاست‌های توسعه‌دهندگان را به‌روزرسانی کرده‌ایم. لطفاً برای اطلاعات بیشتر به شرایط خدمات سرویس‌های YouTube API - تاریخچه ویرایش مراجعه کنید. تغییرات در شرایط خدمات سرویس‌های YouTube API و سیاست‌های توسعه‌دهندگان از 10 ژانویه 2020 به وقت اقیانوس آرام اعمال خواهد شد.

۲۰ آگوست ۲۰۱۹

بخش الزامات راهنمای ارائه محتوای زنده یوتیوب از طریق HLS با دو تغییر به‌روزرسانی شده است:

  • این توضیح می‌دهد که بهترین روش این است که هم بخش‌های تأیید شده و هم بخش‌های برجسته را در هر لیست پخش رسانه‌ای بگنجانید. این روش باعث می‌شود که در صورت از دست رفتن یک لیست پخش رسانه‌ای در سمت سرور، احتمال رد شدن یک بخش کاهش یابد. به عنوان مثال، می‌توانید تا دو بخش تأیید شده و تا پنج بخش برجسته را در هر لیست پخش رسانه‌ای بگنجانید.
  • اکنون ارسال یک لیست پخش رسانه‌ای برای هر بخش رسانه‌ای الزامی است. این امر به سرور امکان می‌دهد در صورت از دست رفتن لیست پخش رسانه‌ای، به سرعت آن را بازیابی کند. این رویه قبلاً به عنوان یک توصیه ذکر شده بود.

۲۸ ژوئن ۲۰۱۹

یوتیوب اکنون از دریافت HLS پشتیبانی می‌کند. بر این اساس، ویژگی ingestionType منبع liveStream از مقدار جدید hls برای شناسایی جریان‌های دریافت شده به یوتیوب با استفاده از HLS پشتیبانی می‌کند.

راهنمای جدید «ارائه محتوای زنده یوتیوب از طریق HLS» دستورالعمل‌هایی را برای استفاده از HLS برای پخش محتوای زنده به یوتیوب از یک انکودر ارائه می‌دهد. هدف این راهنما کمک به فروشندگان انکودر برای افزودن پشتیبانی از ارائه HLS به محصولاتشان است.

۴ آوریل ۲۰۱۹

این به‌روزرسانی شامل تغییرات زیر است:

  • مستندات مرجع API به‌روزرسانی شده است تا موارد استفاده رایج برای هر روش را بهتر توضیح دهد و نمونه‌های کد پویا و با کیفیت بالا را از طریق ویجت APIs Explorer ارائه دهد. برای مثال به مستندات متد liveBroadcasts.list مراجعه کنید. اکنون دو عنصر جدید در صفحات وجود دارد که متدهای API را توصیف می‌کنند:

    • ویجت APIs Explorer به شما امکان می‌دهد دامنه‌های مجوز را انتخاب کنید، پارامترهای نمونه و مقادیر ویژگی را وارد کنید، و سپس درخواست‌های API واقعی ارسال کنید و پاسخ‌های API واقعی را ببینید. این ویجت همچنین یک نمای تمام صفحه ارائه می‌دهد که نمونه‌های کد کامل را نشان می‌دهد، که به صورت پویا به‌روزرسانی می‌شوند تا از دامنه‌ها و مقادیری که وارد کرده‌اید استفاده کنند.

    • بخش موارد استفاده رایج، یک یا چند مورد استفاده رایج برای روشی که در صفحه توضیح داده شده است را شرح می‌دهد. برای مثال، می‌توانید روش liveBroadcasts.list را برای بازیابی اطلاعات مربوط به یک پخش خاص یا بازیابی اطلاعات مربوط به پخش‌های کاربر فعلی فراخوانی کنید.

      شما می‌توانید از لینک‌های موجود در آن بخش برای پر کردن APIs Explorer با مقادیر نمونه برای مورد استفاده خود یا باز کردن APIs Explorer تمام صفحه با آن مقادیری که از قبل پر شده‌اند، استفاده کنید. هدف این تغییرات آسان‌تر کردن مشاهده نمونه‌های کدی است که مستقیماً برای مورد استفاده‌ای که سعی در پیاده‌سازی آن در برنامه خود دارید، قابل اجرا هستند.

    نمونه‌های کد در حال حاضر برای جاوا، جاوا اسکریپت، PHP، پایتون و curl پشتیبانی می‌شوند.

  • صفحه نمونه‌های کد همچنین دارای یک رابط کاربری جدید است که تمام ویژگی‌های مشابه توضیح داده شده در بالا را ارائه می‌دهد. با استفاده از این ابزار، می‌توانید موارد استفاده برای متدهای مختلف را بررسی کنید، مقادیر را در APIs Explorer بارگذاری کنید و APIs Explorer تمام صفحه را باز کنید تا نمونه‌های کد را در جاوا، جاوا اسکریپت، PHP و پایتون دریافت کنید.

    همزمان با این تغییر، صفحاتی که قبلاً نمونه‌های کد موجود برای جاوا، PHP و پایتون را فهرست می‌کردند، حذف شده‌اند.

۲۵ فوریه ۲۰۱۹

مستندات منابع liveChatMessage و superChatEvent به‌روزرسانی شده است تا این واقعیت را منعکس کند که هر دو منبع اکنون می‌توانند حاوی اطلاعاتی در مورد Super Stickers باشند. Super Stickers نوعی پیام Super Chat است که یک تصویر را نمایش می‌دهد. مانند سایر Super Chats، یک پیام Super Sticker توسط یک طرفدار در طول پخش زنده YouTube خریداری می‌شود.

  • در یک منبع liveChatMessage ، ویژگی snippet.type اکنون روی superStickerEvent تنظیم شده است تا نشان دهد که منبع حاوی اطلاعاتی در مورد یک Super Sticker است. در این صورت، منبع همچنین شامل شیء snippet.superStickerDetails است که حاوی اطلاعات اضافی در مورد Super Sticker است.
  • در یک منبع superChatEvent ، مقدار بولی snippet.isSuperStickerEvent نشان می‌دهد که آیا پیام Super Chat یک Super Sticker نیز هست یا خیر. اگر چنین باشد، شیء snippet.superStickerMetadata شامل جزئیات بیشتری در مورد Super Sticker است.

۵ آوریل ۲۰۱۸

توضیحات متد superChatEvents.list به‌روزرسانی شده است تا این واقعیت را منعکس کند که پاسخ API دیگر شامل fanFundingEvents نیست، که در اوایل سال ۲۰۱۷ منسوخ شده بودند.

۳ آوریل ۲۰۱۷

نمونه‌های کد جاوای جدیدی اضافه شده‌اند که نحوه‌ی فهرست کردن ، درج کردن و حذف پیام‌های چت زنده را نشان می‌دهند. این نمونه‌ها متدهای زیر را فراخوانی می‌کنند:

۱۳ فوریه ۲۰۱۷

این به‌روزرسانی شامل تغییرات زیر است:

  • به‌روزرسانی منابع و روش‌های موجود

    • متد liveCuepoints.insert به‌روزرسانی شده است تا این واقعیت را منعکس کند که پارامتر onBehalfOfContentOwner در حال حاضر مورد نیاز است. علاوه بر این، توضیحات این متد به‌روزرسانی شده است تا توجه داشته باشید که فراخوانی‌های این متد باید توسط حسابی مرتبط با مالک محتوای یوتیوب (YouTube Content Owner) مجاز شوند.

۹ فوریه ۲۰۱۷

این به‌روزرسانی شامل تغییرات زیر است:

  • به‌روزرسانی منابع و روش‌های موجود

    • پارامتر جدید hl در متد superChatEvents.list به شما امکان می‌دهد مشخص کنید که مقدار ویژگی snippet.displayString باید مطابق با قراردادهای یک زبان خاص قالب‌بندی شود. تعریف آن ویژگی نیز بر این اساس به‌روزرسانی شده است.

      مقدار پارامتر باید یک کد زبان باشد که در لیست برگردانده شده توسط متد i18nLanguages.list وجود دارد. مقدار پیش‌فرض en است، به این معنی که رفتار پیش‌فرض، قالب‌بندی رشته‌های نمایش داده شده به شکلی است که در زبان انگلیسی استفاده می‌شوند. برای مثال، به طور پیش‌فرض، یک رشته به جای $1.00 به صورت $1,00 قالب‌بندی می‌شود.

۱ فوریه ۲۰۱۷

این به‌روزرسانی شامل تغییرات زیر است:

  • منابع و روش‌های جدید

    • منبع جدید superChatEvent نشان‌دهنده یک پیام Super Chat است که توسط یک طرفدار در طول پخش زنده یوتیوب خریداری شده است. در پخش زنده یوتیوب، Super Chatها از دو طریق از سایر پیام‌ها متمایز می‌شوند:

      • سوپر چت‌ها با یک رنگ مشخص شده‌اند.
      • سوپر چت‌ها برای مدت زمان مشخصی در تیکت پین می‌شوند.

      رنگ سوپر چت، مدت زمانی که در تیکت پین می‌شود و حداکثر طول پیام، همگی با توجه به مبلغ خرید تعیین می‌شوند. مرکز راهنمایی یوتیوب اطلاعات بیشتری در مورد سوپر چت‌ها دارد.

      این API از روشی برای فهرست کردن رویدادهای Super Chat برای پخش زنده یک کانال در 30 روز گذشته پشتیبانی می‌کند. این روش همچنین داده‌های مربوط به رویدادهای Fan Funding ( fanFundingEvents ) را از آخرین پخش زنده کانال برمی‌گرداند.

  • به‌روزرسانی منابع و روش‌های موجود

    • ویژگی snippet.type اکنون از مقدار superChatEvent پشتیبانی می‌کند، که نشان می‌دهد منبع، یک Super Chat را توصیف می‌کند.

      علاوه بر این، ویژگی جدید snippet.superChatDetails از منبع liveChatMessage و فرزندان آن حاوی اطلاعاتی در مورد رویداد Super Chat هستند.

    • ویژگی cdn.resolution مربوط به منبع liveStream اکنون از مقدار 2160p پشتیبانی می‌کند.

  • خطاهای جدید و به‌روز شده

    • این API از خطاهای جدید زیر پشتیبانی می‌کند:

      جزئیات خطا
      liveBroadcasts.insert ، liveBroadcasts.update متدهای liveBroadcasts.insert و liveBroadcasts.update خطاهای 400 ( Bad Request ) را برمی‌گردانند تا نشان دهند که منبع liveBroadcast که در حال درج یا به‌روزرسانی است، حاوی مقدار نامعتبری برای ویژگی contentDetails.enableEmbed یا ویژگی contentDetails.projection است. دلایل خطا برای دو خطای جدید به ترتیب invalidEmbedSetting و invalidProjection هستند.

۱۲ ژانویه ۲۰۱۷

توجه: این یک اطلاعیه منسوخ شده است.

همزمان با انتشار ویژگی جدید سوپر چت ، یوتیوب ویژگی تامین مالی هواداران را منسوخ کرده است و API تامین مالی هواداران در تاریخ ۲۸ فوریه ۲۰۱۷ غیرفعال خواهد شد. از آن تاریخ:

۱۱ آگوست ۲۰۱۶

این به‌روزرسانی شامل تغییرات زیر است:

  • شرایط خدمات سرویس‌های YouTube API ("شرایط به‌روزرسانی‌شده") که به‌تازگی منتشر شده و به‌طور مفصل در وبلاگ مهندسی و توسعه‌دهندگان YouTube مورد بحث قرار گرفته است، مجموعه‌ای غنی از به‌روزرسانی‌ها را برای شرایط خدمات فعلی ارائه می‌دهد. علاوه بر شرایط به‌روزرسانی‌شده که از 10 فوریه 2017 لازم‌الاجرا خواهد شد، این به‌روزرسانی شامل چندین سند پشتیبان است که به توضیح سیاست‌هایی که توسعه‌دهندگان باید دنبال کنند، کمک می‌کند.

    مجموعه کامل اسناد جدید در تاریخچه ویرایش‌های مربوط به «شرایط به‌روزرسانی‌شده» شرح داده شده است. علاوه بر این، تغییرات آینده در «شرایط به‌روزرسانی‌شده» یا اسناد پشتیبان نیز در آن تاریخچه ویرایش توضیح داده خواهد شد. می‌توانید از طریق پیوندی در آن سند، در یک فید RSS که فهرست تغییرات در آن تاریخچه ویرایش را نشان می‌دهد، مشترک شوید.

۲۰ مه ۲۰۱۶

یوتیوب اکنون از دریافت DASH پشتیبانی می‌کند. بر این اساس، ویژگی ingestionType منبع liveStream از مقدار جدید dash برای شناسایی جریان‌های دریافت‌شده در یوتیوب با استفاده از DASH پشتیبانی می‌کند.

راهنمای جدید «ارائه محتوای زنده یوتیوب از طریق DASH» دستورالعمل‌هایی را برای استفاده از فرمت DASH Delivery برای پخش زنده داده‌ها در یوتیوب از یک رمزگذار ارائه می‌دهد. این راهنما به فروشندگان رمزگذار کمک می‌کند تا پشتیبانی از تحویل DASH را به محصولات خود اضافه کنند.

۱۸ آوریل ۲۰۱۶

این به‌روزرسانی شامل تغییرات زیر است:

  • به‌روزرسانی منابع و روش‌های موجود

    • به‌روزرسانی‌های منابع liveStream
      • یوتیوب اکنون از پخش زنده با وضوح تصویر ۱۴۴۰p با نرخ ۳۰ یا ۶۰ فریم در ثانیه پشتیبانی می‌کند.

        علاوه بر این، منبع liveStream شامل ویژگی‌های جدیدی برای مشخص کردن نرخ فریم و وضوح داده‌های ویدیوی ورودی است:

        خواص
        cdn.frameRate نرخ فریم داده‌های ویدیوی ورودی. مقادیر معتبر 30fps و 60fps هستند.
        cdn.resolution وضوح داده‌های ویدیوی ورودی. مقادیر معتبر برای این ویژگی عبارتند از: 1440p ، 1080p ، 720p ، 480p ، 360p و 240p .
      • مطابق با معرفی ویژگی‌های cdn.frameRate و cdn.resolution از منبع liveStream ، cdn.format این منبع اکنون منسوخ شده است. ویژگی cdn.format وضوح و نرخ فریم را در یک مقدار واحد مشخص می‌کند.

        ما شما را تشویق می‌کنیم که به فیلدهای پشتیبانی‌شده‌ی جدید منتقل شوید. در عین حال، cdn.format همچنان به کار خود ادامه می‌دهد. علاوه بر این، درخواست‌ها برای درج پخش زنده در حال حاضر تا زمانی که مقادیری را برای ویژگی cdn.format یا ویژگی‌های cdn.frameRate و cdn.resolution تعیین کنید، موفق می‌شوند. اگر برای هر سه ویژگی مقادیری ارائه دهید، اگر مقادیر با هم مطابقت نداشته باشند، API ممکن است خطایی را برگرداند.

        توجه داشته باشید که اگرچه ویژگی cdn.format منسوخ شده است، اما اکنون از دو مقدار جدید، 1440p و 1440p_hfr ، پشتیبانی می‌کند تا پشتیبانی API از استریم‌های 1440p با سرعت 30 یا 60 فریم در ثانیه را نشان دهد.

    • به‌روزرسانی‌های منابع liveBroadcast
      • منبع liveBroadcast شامل ویژگی‌های جدید زیر است:

        خواص
        contentDetails.boundStreamLastUpdateTimeMs تاریخ و زمانی که آخرین به‌روزرسانی پخش زنده توسط ویژگی contentDetails.boundStreamId مربوط به پخش انجام شده است.
        contentDetails.projection قالب پخش. مقدار پیش‌فرض این ویژگی rectangular است. مقادیر معتبر برای این ویژگی 360 و rectangular هستند.
      • تعریف statistics.totalChatCount از منبع liveBroadcast به‌روزرسانی شده است تا توجه شود که مقدار ویژگی فقط در صورتی نمایش داده می‌شود که پخش حداقل یک پیام چت داشته باشد.

    • به‌روزرسانی‌های منابع liveChatMessage
      • ویژگی snippet.type از دو مقدار جدید - messageDeletedEvent و userBannedEvent - پشتیبانی می‌کند که با ویژگی‌های جدید شرح داده شده در بخش زیر مطابقت دارند. تعریف ویژگی snippet.authorChannelId نیز به‌روزرسانی شده است تا توضیح دهد که مقدار ویژگی برای این انواع پیام جدید چه چیزی را مشخص می‌کند.

      • منبع liveChatMessage شامل ویژگی‌های جدید زیر است:

        خواص
        snippet.messageDeletedDetails این شیء حاوی اطلاعاتی درباره پیامی است که توسط مدیر چت حذف شده است. این شیء فقط در صورتی وجود دارد که مقدار ویژگی snippet.type برابر با messageDeletedEvent باشد.
        snippet.userBannedDetails این شیء حاوی اطلاعاتی در مورد کاربری است که از شرکت در چت منع شده است. این شیء همچنین حاوی اطلاعاتی در مورد خود منع است، یعنی اینکه آیا منع دائمی است یا موقت. اگر منع موقت باشد، یکی از ویژگی‌های شیء مدت زمان منع را مشخص می‌کند.

        این شیء فقط در صورتی وجود دارد که مقدار ویژگی snippet.type userBannedEvent باشد.
  • خطاهای جدید و به‌روز شده

    • این API از خطاهای جدید زیر پشتیبانی می‌کند:

      جزئیات خطا
      liveBroadcasts.bind متد liveBroadcasts.bind خطای 403 ( Forbidden ) را برمی‌گرداند تا نشان دهد که کاربر درخواست‌های زیادی را در یک بازه زمانی مشخص ارسال کرده است. دلیل خطا userRequestsExceedRateLimit است.

      متدهای liveBroadcasts.insert و liveBroadcasts.update از قبل از همین خطا پشتیبانی می‌کنند.
      liveStreams.insert متد liveStreams.insert از چهار خطای جدید 400 ( Bad Request ) پشتیبانی می‌کند که یک مقدار ویژگی نامعتبر را در منبع liveStream که درخواست سعی در درج آن داشته است، شناسایی می‌کنند. لیست زیر دلایل خطا و ویژگی‌هایی را که با آنها مرتبط هستند، مشخص می‌کند:
      liveStreams.insert متد liveStreams.insert از دو خطای جدید 400 ( Bad Request ) پشتیبانی می‌کند که هر کدام نشان می‌دهد مقدار مورد نیاز در منبع liveStream که درخواست سعی در درج آن داشته است، وجود ندارد. لیست زیر دلایل خطا و ویژگی‌های مرتبط با آنها را مشخص می‌کند:
      به طور خاص، وقتی یک منبع liveStream وارد می‌کنید، باید مقداری را برای ویژگی cdn.format یا برای ویژگی‌های cdn.frameRate و cdn.resolution مشخص کنید.
      • اگر برای هر یک از سه ویژگی مقداری تعیین نکنید، API خطای formatRequired را برمی‌گرداند.
      • اگر مقداری برای cdn.resolution تعیین کنید اما cdn.frameRate مشخص نکنید، API خطای frameRateRequired را برمی‌گرداند.
      • اگر مقداری برای cdn.frameRate تعیین کنید اما cdn.resolution مقداری تعیین نکنید، API خطای resolutionRequired را برمی‌گرداند.
      liveStreams.update اگر درخواست سعی در تغییر مقدار هر یک از ویژگی‌های غیرقابل تغییر زیر داشته باشد، متد liveStreams.update خطای 403 ( Forbidden ) را برمی‌گرداند: reason در پاسخ خطا، liveStreamModificationNotAllowed است.

۱۸ دسامبر ۲۰۱۵

قوانین اتحادیه اروپا (EU) ایجاب می‌کند که برخی اطلاعات باید به کاربران نهایی در اتحادیه اروپا افشا و از آنها رضایت گرفته شود. بنابراین، برای کاربران نهایی در اتحادیه اروپا، شما باید از سیاست رضایت کاربر اتحادیه اروپا پیروی کنید. ما اطلاعیه‌ای در مورد این الزام در شرایط خدمات YouTube API خود اضافه کرده‌ایم.

۱۷ دسامبر ۲۰۱۵

این به‌روزرسانی شامل تغییرات زیر است:

  • منابع و روش‌های جدید

    • این API از چندین منبع جدید برای پشتیبانی از قابلیت چت برای پخش زنده پشتیبانی می‌کند. یوتیوب از قابلیت چت زنده در طول پخش زنده فعال پشتیبانی می‌کند و این منابع و متدهای آنها از بازیابی پیام‌های چت و همچنین توابع مدیریتی برای چت پشتیبانی می‌کنند.

      منابع
      liveChatMessage این منبع، پیامی را در یک گفتگوی زنده یوتیوب نشان می‌دهد. یوتیوب از انواع مختلفی از پیام‌ها، از جمله پیام‌های متنی و رویدادهای جذب سرمایه طرفداران، پشتیبانی می‌کند. برخی از انواع پیام‌ها، مرحله خاصی از گفتگو را مشخص می‌کنند، مانند آغاز دوره فقط حامیان مالی یا پایان گفتگو. این API از روش‌هایی برای فهرست کردن، درج و حذف پیام‌های گفتگوی زنده پشتیبانی می‌کند.
      liveChatModerators این منبع، یک مدیر چت را شناسایی می‌کند. مدیران می‌توانند برخی از وظایف مدیریتی، مانند ممنوعیت کاربران از چت یا حذف پیام‌ها را انجام دهند. این API از روش‌هایی برای فهرست کردن، درج و حذف مدیران چت زنده پشتیبانی می‌کند.
      liveChatBans This resource identifies a user who is banned from posting messages to a particular live chat. Bans can be temporary or permanent. The API supports methods to insert and delete live chat bans.
      fanFundingEvents This resource represents a Fan Funding event on a YouTube channel. Fan Funding provides a way for viewers to voluntarily support YouTube Creators with one-time monetary support.

      The API's fanFundingEvents.list method lists a channel's Fan Funding events. Fan Funding events that are initiated through a live chat during a live broadcast owned by the channel also trigger a fanFundingEvent message to the broadcast's live chat.

      Learn more about Fan Funding in the YouTube Help Center .
      sponsors The sponsor resource identifies a sponsor of a YouTube channel. A sponsor pays a monthly fee to a channel. A badge shows up next to the sponsor's messages in the channel's live chats and sponsors can also participate in live chats exclusively for the channel's sponsors, if those occur.

      The API's sponsors.list method lists a channel's sponsors. When users sign up to sponsor a channel during a live broadcast owned by that channel, the API also adds a newSponsorEvent message to the broadcast's live chat.

      Learn more about sponsorships in the YouTube Help Center .

  • Updates to existing resources and methods

    • The liveBroadcast resource contains the following new properties:

      خواص
      snippet.liveChatId The ID for the broadcast's YouTube live chat. With this ID, you can use the liveChatMessage resource's methods to retrieve, insert, or delete chat messages. You can also add or remove chat moderators, ban users from participating in live chats, or remove existing bans.
      contentDetails.closedCaptionsType Note: This property replaces the contentDetails.enableClosedCaptions property.

      This property indicates whether closed captioning is enabled for your broadcast and, if so, what type of closed captions you are providing:
      • closedCaptionsDisabled : Closed captions are disabled for the live broadcast.
      • closedCaptionsHttpPost : You will send captions, via HTTP POST, to an ingestion URL associated with your live stream.
      • closedCaptionsEmbedded : Captions will be encoded in the video stream using EIA-608 and/or CEA-708 formats.
      contentDetails.enableClosedCaptions This property has been deprecated as of December 17, 2015. Use the contentDetails.closedCaptionsType property instead. For API clients that are already using this property:
      • Setting the property value to true is equivalent to setting the contentDetails.closedCaptionsType property to closedCaptionsHttpPost .
      • Setting the property value to false is equivalent to setting the contentDetails.closedCaptionsType property to closedCaptionsDisabled .
    • The liveBroadcasts.list method's new broadcastType parameter lets you filter an API response to include event broadcasts, persistent broadcasts, or all broadcasts.

      A persistent broadcast is one that always exists and is not tied to a particular event. Specifically, a channel's default broadcast is a persistent broadcast, and it is accessible via the Live Dashboard in the YouTube Creator Studio. The channel's other broadcasts are event broadcasts.

  • The liveStream resource's status.healthStatus.configurationIssues[].type field reports the following new health status errors:

    خطاها
    audioTooManyChannels The audio has more than two channels, but only one (mono) or two (stereo) channels are supported. Please correct the number of audio channels.
    frameRateHigh The current framerate is too high. Please set the framerate to %(framerate)s fps or less.
  • The publication date of the previous documentation update was corrected.

  • New and updated errors

    • In addition to errors defined for the new resources listed above, the API supports the following new errors:

      جزئیات خطا
      liveBroadcasts.update
      HTTP Response Code forbidden (403)
      دلیل closedCaptionsTypeModificationNotAllowed
      توضیحات The contentDetails.closedCaptionsType value can only be modified when the broadcast is in the created or ready status.
      liveBroadcasts.update
      HTTP Response Code invalidValue (400)
      دلیل invalidEnableClosedCaptions
      توضیحات In the liveBroadcast resource , the value of the contentDetails.enableClosedCaptions property is incompatible with the value of the contentDetails.closedCaptionType setting. Modify the resource to only include one of the two properties, and then resubmit the request.

August 19, 2015

This update contains the following changes:

  • New resources and methods

    • Note: Documentation for the liveChat resource and its methods is confidential and only visible to select YouTube partners.

      The new liveChat resource contains a comment posted during a live broadcast on YouTube. The API supports two methods for this resource:

      روش‌ها
      liveChats.list List live chat messages for a broadcast.
      liveChats.insert Create a new chat message.

      Live chat messages can only be retrieved and posted while a broadcast is live.

  • Updates to existing resources and methods

    • The liveStream resource contains the following new properties:

      خواص
      snippet.isDefaultStream Indicates whether this stream is the default stream for the channel. A channel's default stream exists indefinitely, does not have a start or end time associated with it, and cannot be deleted. See the property's definition for more information about how default streams work.
      status.healthStatus This object contains information that could be used to identify, diagnose and resolve streaming problems. The object contains a number of child properties to help you evaluate the health of a live video stream.

      In particular, the status.healthStatus.configurationIssues[] object lists issues affecting a video stream. A new document, Configuration Issues for LiveStream Resources , lists all of the issues that the API reports.
      contentDetails.isReusable Indicates whether the stream is reusable, which means that it can be bound to multiple broadcasts. It is common for broadcasters to reuse the same stream for many different broadcasts if those broadcasts occur at different times.
    • The liveBroadcast resource contains the following new properties:

      خواص
      snippet.isDefaultBroadcast Indicates whether this broadcast is the default broadcast for the channel. When a YouTube channel is enabled for live streaming, YouTube creates a default stream and a default broadcast for the channel. The stream defines how the channel owner sends live video to YouTube, and the broadcast is how viewers can see the default stream. See the property's definition for more information about how default broadcasts work.
      contentDetails.enableLowLatency Indicates whether this broadcast should be encoded for low-latency streaming. A low-latency stream can reduce the amount of time it takes for video to be visible to users watching a broadcast, though it can also impact the resolution for viewers of the stream.
      statistics.totalChatCount The total number of live chat messages associated with the broadcast. The property and its value are present if the broadcast is visible to the user and has the live chat feature enabled. Note that this property will not specify a value after the broadcast ends. So, this property would not identify the number of chat messages for an archived video of a completed live broadcast.
  • New and updated errors

    • In addition to errors defined for the new liveChat resource, the API supports the following new error:

      جزئیات خطا
      liveStreams.update
      HTTP Response Code forbidden (403)
      دلیل liveStreamModificationNotAllowed
      توضیحات The API does not allow you to change a reusable stream to be non-reusable, or vice versa. For more information, see Understanding Broadcasts and Streams

May 21, 2015

This update contains the following changes:

  • YouTube now supports live video streaming at 60 frames per second (fps), which means smoother playback for gaming and other fast-action videos. When you start a live stream on YouTube at 60fps, YouTube also makes the stream available in 30fps on devices where high-frame-rate viewing is not yet available.

    The liveStream resource's cdn.format property supports two new values for this feature: 720p_hfr and 1080p_hfr .

    See the YouTube Creators Blog for more information about this feature.

August 21, 2014

This update contains the following changes:

  • The definition of the liveBroadcasts.control method's walltime parameter has been updated to note that the property value is specified in ISO 8601 format ( YYYY-MM-DDThh:mm:ss.sssZ ).

  • The API now supports the following errors:

    Error type Error detail توضیحات
    insufficientPermissions liveStreamingNotEnabled All methods for the liveBroadcast and liveStream resources return this error if the user that authorized the API request has not been enabled to stream live video on YouTube. Details explaining why the user cannot stream live video may be available in the user's channel settings at https://www.youtube.com/features .
    rateLimitExceeded userRequestsExceedRateLimit The liveBroadcasts.insert and liveStreams.insert methods both return this error to indicate that the user has sent too many requests within a given timeframe.

May 2, 2014

This update contains the following changes:

  • The descriptions of the liveStream resource and of the liveBroadcasts.bind method have been updated to note that a broadcast can only be bound to one video stream, but a video stream can be bound to more than one broadcast. This change is solely a correction to the documentation; the underlying API functionality has not changed.

  • The liveBroadcast resource's contentDetails.monitorStream.enableMonitorStream property has been updated to explain that if the property's value is true , then you must transition your broadcast to the testing state before you can transition it to the live state. (If the property's value is false , your broadcast cannot have a testing stage, so you can transition the broadcast directly to the live state.

  • The liveCuepoint resource's settings.offsetTimeMs property has been updated to note that you should not specify a value for the property if your broadcast does not have a monitor stream.

  • All of the methods for the liveBroadcast and liveStream resources now support the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters. These parameters allow you to use the same authorization credentials to complete API requests for different channels associated with the same content owner.

  • The liveCuepoints.insert method's documentation has been updated to note that you can set a value for the settings.walltime property when calling that method.

  • The error documentation now specifies the HTTP response code for each error type.

  • The API now supports the following error:

    Error type Error detail توضیحات
    insufficientPermissions livePermissionBlocked The liveBroadcasts.insert , liveBroadcasts.transition , and liveStreams.insert methods return this error if the user that authorized the request is unable to stream live video on YouTube. Details explaining why the user cannot stream live video may be available in the user's channel settings at https://www.youtube.com/features .
  • The liveBroadcasts.insert method's invalidScheduledStartTime error has been updated to clarify that the scheduled start time must be close enough to the current date that a broadcast could be reliably scheduled at that time.

December 13, 2013

This update contains the following changes:

  • The liveBroadcast resource's new status.recordingStatus property identifies the broadcast's current status.

  • The liveBroadcast resource's new contentDetails.enableClosedCaptions property indicates whether closed captions can be ingested for the broadcast. The property value can be set when you insert or update a broadcast, but it cannot be updated once the broadcast is in the testing or live state. If you set this property to true , then the liveStream resource that is bound to the broadcast will specify the ingestion URL to use for the broadcast's closed captions.

  • The liveBroadcast resource's snippet.scheduledEndTime property now supports broadcasts that are scheduled to continue indefinitely. With this change, the property is no longer required in liveBroadcasts.insert and liveBroadcasts.update requests.

    If you retrieve a liveBroadcast resource that does not specify a value for this property, then the broadcast is scheduled to continue indefinitely. Similarly, if you call the liveBroadcasts.insert or liveBroadcasts.update method and do not specify a value for this property, the broadcast will be scheduled to continue indefinitely.

  • The liveBroadcast resource's contentDetails.recordFromStart property, which already had a default value of true , can now only be set to false if the broadcasting channel is allowed to disable recordings for live broadcasts.

    If your channel does not have permission to disable recordings, and you attempt to insert a broadcast with the recordFromStart property set to false , the API will return a Forbidden error. In addition, if your channel does not have that permission and you attempt to update a broadcast to set the recordFromStart property to false , the API will return a modificationNotAllowed error.

  • The liveBroadcast resource no longer contains an enableArchive property, which had been mentioned in the descriptions of the contentDetails.enableDvr and contentDetails.enableEmbed properties.

  • The list of valid values for the liveBroadcast resource's status.lifeCycleStatus property has been updated to include a description of each status.

  • The liveCuepoint resource's new settings.walltime property specifies the date and time at which the cuepoint should be inserted. The API returns an error if a request tries to insert a cuepoint that specifies a value for this property and for the settings.offsetTimeMs property.

  • The new contentDetails object in a liveStream resource contains information about the stream. Currently, the object's only property is contentDetails.closedCaptionsIngestionUrl , which specifies the ingestion URL for closed captions associated with the video stream.

  • The list of valid values for the liveStream resource's status.streamStatus property has been updated to include a description of each status.

  • The liveBroadcasts.control method's new walltime parameter lets you specify the date and time when a slate change will occur. The API returns an error if a request specifies a value for this parameter and for the offsetTimeMs parameter.

  • In the API response to a liveBroadcasts.list request, the value of the kind property has changed from youtube#liveBroadcastList to youtube#liveBroadcastListResponse .

  • In the API response to a liveStreams.list request, the value of the kind property has changed from youtube#liveStreamList to youtube#liveStreamListResponse .

  • The eventId property has been deprecated from both the liveBroadcastListResponse and the liveStreamListResponse .

  • The API supports the following new errors:

    Error type Error detail توضیحات
    invalidValue conflictingTimeFields The liveBroadcasts.control method returns this error if your request specifies values for the offsetTimeMs and walltime parameters. A request can either omit both parameters or specify a value for one of the two parameters.
    invalidValue invalidWalltime The liveBroadcasts.control method returns this error if the walltime parameter's value is invalid.
    forbidden enableClosedCaptionsModificationNotAllowed The liveBroadcasts.update method returns this error if you attempt to update the contentDetails.enableClosedCaptions value and the broadcast's status is not created or ready .
    invalidValue conflictingTimeFields The liveCuepoints.insert method returns this error if your request specifies values for the settings.offsetTimeMs and settings.walltime properties. A request can either omit both properties or specify a value for one of the two properties.

    In addition, the liveStreams.update method no longer supports a cdnRequired error similar to the one that the liveStreams.insert method supports.

May 10, 2013

This update contains the following changes:

May 2, 2013

This update contains the following changes:

March 27, 2013

This update contains the following changes:

  • The following properties have changed in the liveBroadcast resource:

    • The startWithSlateCuepoint property has been renamed to startWithSlate .
    • The enableArchive property has been renamed to recordFromStart .
    • The slateSettings object has been deprecated and removed from the documentation. Error messages related to the slateSettings object or its properties have also been removed. Finally, the "Displaying Slates" section of the Getting started guide has been removed.

  • The API no longer supports the ability to insert in-stream slates using the liveCuepoints.insert method. The following documents have been updated to reflect this change:

    • The index page , Getting started guide, and Life of a broadcast tutorial no longer mention this functionality.

    • The liveCuepoint resource's settings.cueType property no longer supports slate as a property value. (The only supported value is ad .

    • The liveCuepoint resource's settings.eventState property has been deprecated and removed from the documentation.

March 18, 2013

This update contains the following changes:

  • All of the API's error messages have been updated to more clearly explain possible errors and, when possible, offer guidance about how to fix them.

  • The API may now return several new errors. The list below identifies the error and the API method that might return that error:

    • liveBroadcasts.insert – A broadcast's scheduled end time must be after its scheduled start time.
    • liveBroadcasts.insert – The broadcast specifies an invalid privacy status.
    • liveBroadcasts.update – The resource does not contain or does not set a value for the contentDetails.enableArchive property.
    • liveBroadcasts.update – The resource does not contain or does not set a value for the contentDetails.enableContentEncryption property.
    • liveBroadcasts.update – The resource does not contain or does not set a value for the contentDetails.enableDvr property.
    • liveStreams.insert – The snippet title must be between 1 and 128 characters long.
    • liveStreams.update – The resource does not contain or does not set a value for the snippet.title property.

  • The liveStream resource documentation has been updated to reflect that multicast and WebM are not supported ingestion methods as previously indicated. The list of formats for the cdn.format property has been updated accordingly, and the cdn.multicastIngestionInfo object and its child properties have been removed from the resource's documentation. In addition, http has been removed from the list of supported cdn.ingestionType values.

،

This page lists YouTube Live Streaming API changes and documentation updates. Subscribe to this changelog .اشتراک

۱۸ آگوست ۲۰۲۶

This update contains the following changes:

  • The documentation for the liveBroadcasts.update method has been updated to include new monetization-related errors: preconditionFailed (412) (reason: videoNotEligibleForAdsMonetization ) and backendError (503) (reason: backendError ).

۱۷ آگوست ۲۰۲۶

This update contains the following changes:

  • The liveBroadcast resource's new snippet.categoryId property lets you set, update, and retrieve the video category associated with a live broadcast.

July 20, 2026

This update contains the following changes:

۹ ژوئیه ۲۰۲۶

This update contains the following changes:

۱ ژوئن ۲۰۲۶

This update contains the following changes:

  • The liveBroadcast resource's contentDetails.availabilityConfig property lets you specify geo-restrictions for a live broadcast so that you can manage regional availability for live events.

۲۶ مارس ۲۰۲۶

This update contains the following changes:

  • The snippet.type property now supports the new value giftEvent .

  • The liveChatMessage resource's new snippet.giftEventDetails property and its children contain information about the gift event.

۱۲ ژانویه ۲۰۲۶

The API now supports enabling midrolls and automated midroll insertion for live broadcasts.

The broadcast owner can choose to enable midrolls for a broadcast as long as the broadcast is eligible for midrolls. The owner can also turn off midrolls for a broadcast at any time.

If a broadcast is enabled for midrolls, the broadcast owner can choose to enable automated midroll insertion. They can also turn off automated ads for a broadcast at any time.

When the broadcast owner enables automated ads, the owner can choose one of the following options:

  • Let YouTube optimize mid-roll insertion. This option supports three modes:
    • Low: lower earnings potential, less interrupted viewer experience
    • Medium: medium earnings potential, balanced viewer experience
    • High: higher earnings potential, more interrupted viewer experience
  • Manually configure the strategy and interval for mid-roll insertion. In this case, the owner must set up two parameters:
    1. The scheduling strategy for ad cuepoints. Cuepoints can be inserted concurrently for all viewers or the timing of the cuepoints can vary from viewer to viewer. The latter strategy enables YouTube to schedule cuepoints at an increased rate that allows viewers to receive cuepoints when they are eligible to do so.
    2. The length of the interval between mid-roll ad breaks.

The documentation reflects the following API changes to support this feature:

  • The liveBroadcast resource's monetizationDetails object contains fields for midroll enablement and automated ads configs.
  • The update method can be used to enable or disable midroll ads. That method can also be used to set up the automated ads for a live broadcast. The documentation identifies several new errors that can occur when updating monetization and automated ads settings for a live broadcast.

July 14th, 2025

The description of the liveChatMessages.streamList method has been updated to provide guidance on the streamList API usages.

۹ اکتبر ۲۰۲۳

For reference only, you can find which Sticker IDs relate to which Super Stickers in this CSV file . The definitions of the liveChatMessage resource's snippet.superStickerDetails.superStickerMetadata.stickerId property and the superChatEvent resource's snippet.superStickerMetadata.stickerId property have both been updated to reflect this information.

۱۵ سپتامبر ۲۰۲۳

The API now supports a new way of inserting ads into live broadcasts. In addition to liveCuepoints , which let you manually insert ad breaks into a broadcast, YouTube now supports a feature to automatically insert midroll ad breaks into a broadcast at fixed intervals.

If the broadcast owner enables automated ads, they can view the following aspects of ad behavior:

  • the length of the interval between midroll ad breaks.
  • the scheduling strategy for ad cuepoints. Cuepoints can be inserted concurrently for all viewers or the timing of the cuepoints can vary from viewer to viewer. The latter strategy enables YouTube to schedule cuepoints at an increased rate that allows viewers to receive cuepoints when they are eligible to do so.
  • a period during which midroll ads are not shown; for this feature, the broadcast owner specifies that midroll ads insertion is paused until a particular time.

The documentation reflects the following API changes to support this feature:

  • The liveBroadcast resource now contains a monetizationDetails object. The object's fields indicate whether automatic ad insertion is enabled for the broadcast and specify additional information for scheduling cuepoints.
  • The liveBroadcast.list method's part parameter supports the value monetizationDetails .
  • The update method can be used to pause midroll ads insertion for a certain period for a live broadcast. The documentation also now identifies several errors that can occur when updating the monetization details for a live broadcast.

۱ آگوست ۲۰۲۳

This update contains the following changes:

  • The liveBroadcasts.update method no longer requires values to be specified for these fields:

    • snippet.title
    • status.privacyStatus

    Omitting these fields from the request will leave them unchanged.

۱ نوامبر ۲۰۲۲

  • The new liveBroadcasts.cuepoint method enables any channel owner running a live broadcast on YouTube to insert cuepoints into that broadcast, which can trigger ad breaks. This method replaces the liveCuepoints.insert method, which only enabled YouTube content partners to insert cuepoints into live broadcasts.

    Several guides have been updated to reflect the availability of this new method.

  • Note: This is a deprecation announcement.

    The liveCuepoints.insert method is now deprecated. Support for the liveCuepoints.insert method will be removed on or after May 1, 2023. API users should update their applications to call the liveBroadcasts.cuepoint method instead.

  • Documentation for the liveBroadcasts.control method has been removed. A deprecation notice for that method was posted in September 2020.

۱ اکتبر ۲۰۲۲

This update contains the following changes:

  • The liveBroadcasts.update method no longer requires values to be specified for these fields:

    • contentDetails.enableContentEncryption
    • contentDetails.enableDvr
    • contentDetails.enableEmbed
    • contentDetails.recordFromStart
    • contentDetails.startWithSlate

    Omitting these fields from the request will leave them unchanged.

  • Removed documentation for obsolete liveBroadcast fields:

    • contentDetails.enableContentEncryption
    • contentDetails.startWithSlate

۱ آوریل ۲۰۲۲

This update contains the following changes:

۱۵ سپتامبر ۲۰۲۱

This update contains the following changes:

  • The snippet.type property now supports two new values:

    • newSponsorEvent
    • memberMilestoneChatEvent
  • The liveChatMessage resource's new snippet.memberMilestoneChatDetails property and its children contain information about the Member Milestone Chat event. Similarly, the new snippet.newSponsorDetails property and its children contain information about the New Sponsor event.

December 1, 2020

The API's liveBroadcasts.transition method supports a new 403 ( Forbidden ) error, which indicates that the user has sent too many requests within a given timeframe. The error reason is userRequestsExceedRateLimit .

۲۱ سپتامبر ۲۰۲۰

  • The definition of the liveBroadcast resource's status.madeForKids property has been updated to clarify that the property is read-only. This does not reflect a change in API functionality.

    To designate a live broadcast as being child-directed, set the status.selfDeclaredMadeForKids property to true when calling the liveBroadcasts.insert method to create the broadcast.

  • Note: This change includes a deprecation announcement and an update to a prior deprecation announcement.

    The liveBroadcasts.control method will be deprecated on or after 1 October 2020. After that date, all calls to this method will return a forbidden (403) error, and the method will later be completely removed. Clients can still implement their own slating by adding an overlay to the video sent to YouTube's ingestion servers.

    The deprecation date for the deprecation announcement made on 16 April 2020 , which was originally scheduled for 1 September 2020, has been pushed back and will now happen on or after 1 October 2020. Thus, the features included in that deprecation announcement and the liveBroadcasts.control method will all be deprecated at the same time.

۱۷ ژوئیه ۲۰۲۰

Note: This is an update to a prior deprecation announcement.

The liveStream resource's cdn.format field, which was deprecated in April 2016, will no longer be supported as of August 17, 2020. Requests still using that field will fail as of that date.

If your code still uses the cdn.format field, it must be updated to specify the frame rate and resolution separately, using the cdn.frameRate and cdn.resolution properties.

July 6, 2020

The Delivering Live YouTube Content via HLS guide has been updated with a few changes:

In addition, the new ingestion protocol comparison lists the ingestion protocols that YouTube supports, the codecs supported for each protocol, and additional information regarding appropriate use cases for each protocol.

۱۶ آوریل ۲۰۲۰

This update includes a new property and a deprecation announcement:

  • The liveBroadcast resource now supports the contentDetails.enableAutoStop property. The property indicates whether a broadcast should stop automatically around one minute after the channel owner stops streaming video on the bound video stream.

    The life of a broadcast document has been updated to explain how the step-by-step process of creating and managing a live YouTube event changes if you set the contentDetails.enableAutoStart or contentDetails.enableAutoStop properties to true .

  • Note: This is a deprecation announcement. These changes will go into effect on or after September 1, 2020. The actual date that the changes take effect is referred to below as the deprecation date.

    This update explains a potentially breaking change. It affects API client applications that use channels' default liveStream and liveBroadcast resources to stream live content on YouTube. Specifically, the broadcast ID and stream ID associated with the persistent broadcast and stream will no longer function to start new broadcasts.

    Your application will be affected if any of the following are true:

    • It checks the value of the liveBroadcast resource's isDefaultBroadcast property. This property will not be returned after the deprecation date.
    • It checks the value of the liveStream resource's isDefaultStream property. This property will not be returned after the deprecation date.
    • It calls the liveBroadcasts.list method and sets the broadcastType parameter value to persistent or all . This parameter will be deprecated as part of these changes. As of the deprecation date:
      • If the broadcastType parameter value is persistent , then the liveBroadcasts.list method will not return any results.
      • If the broadcastType parameter value is all , then the liveBroadcasts.list method will not return persistent broadcasts that existed before that time.

    As background, for the past few years, YouTube has automatically created a default stream and a default broadcast for a channel when that channel was enabled for live streaming. The default stream existed indefinitely, did not have a start or end time associated with it, and could not be deleted. Similarly, the default broadcast was considered persistent . It always existed and was not bound to a particular event.

    As of the deprecation date:

    • YouTube will no longer create default streams and broadcasts. Instead of relying on the default resources, API clients need to be able to create and manage liveBroadcast and liveStream resources and to bind those resources together.
    • If a channel's default broadcast and default stream are actively live, meaning the channel is using them for a live broadcast at the time the deprecation goes into effect, the ongoing broadcast will not be affected. However, after that broadcast ends, the channel will not be able to use the default broadcast and default stream again.
    • If a channel's default broadcast and default stream are not actively live, then after the deprecation goes into effect, YouTube will ignore attempts to use those resources to broadcast video.

    If your application is affected, please refer to the following documents, which will help you to update your application so that it still works as expected following this change:

    • A new migration guide tries to explain the steps that developers might need to address in API clients that currently use default broadcasts and streams.
    • The Life of a broadcast guide takes you through a step-by-step process that explains how to create and manage a live event on YouTube. Each step explains the API calls or other things that you need to do to complete a specific action, and your application will need to follow that process when YouTube stops supporting default streams and broadcasts.

۳۱ مارس ۲۰۲۰

Note: This is a deprecation announcement.

The sponsor resource and sponsors.list method have been deprecated and replaced by the member resource and members.list method.

The sponsors.list method will no longer be supported on or after September 30, 2020. API clients should update calls to the sponsors.list method to use the members.list method instead. Please see the YouTube Data API revision history for more information about the new resource.

۱۱ مارس ۲۰۲۰

The Ingestion endpoint section of the Delivering Live YouTube Content via HLS guide has been updated to clarify the process that an encoder should use to complete the file= parameter value when forming the primary and backup ingestion URLs.

۴ فوریه ۲۰۲۰

The Delivering Live YouTube Content via HLS guide has been updated to note that DELETE requests are optional and that YouTube's HLS endpoint ignores them. For performance reasons, YouTube recommends clients do not send DELETE requests.

January 10, 2020

The API now supports the ability to identify child-directed content, which YouTube calls "made for kids." Learn more about "made for kids" content in the YouTube Help Center.

  • The liveBroadcast resource supports two new properties to enable content creators and viewers to identify "made for kids" content:
    • The selfDeclaredMadeForKids property enables content creators to specify whether a live broadcast is child-directed content. This property can be set when creating a broadcast via the liveBroadcasts.insert method. Note that this property is only included in API responses that contain liveBroadcast resources if the channel owner authorized the API request.
    • The madeForKids property enables any API user to retrieve the "made for kids" status of a broadcast. For example, the status might be determined based on the value of the selfDeclaredMadeForKids property. See the YouTube Help Center for more information about setting the audience for your channel, videos, or broadcasts.
  • In the YouTube Data API, the channel resource also supports new selfDeclaredMadeForKids and madeForKids properties.

We have also updated the YouTube API Services Terms of Service and Developer Policies. Please see the YouTube API Services Terms of Service - Revision History for more information. The changes to the YouTube API Services Terms of Service and Developer Policies will take effect on January 10, 2020 Pacific Time.

۲۰ آگوست ۲۰۱۹

The Requirements section of the Delivering Live YouTube Content via HLS guide has been updated with two changes:

  • It explains that it is a best practice to include both acknowledged segments and outstanding segments in each Media Playlist. This practice makes it less likely for a segment to be skipped if a Media Playlist is lost on the server side. For example, you could include up to two acknowledged segments and up to five outstanding segments in each Media Playlist.
  • It is now a requirement to send a Media Playlist for every Media Segment. This enables the server to recover quickly if a Media Playlist is lost. This practice was previously listed as a recommendation.

June 28, 2019

YouTube now supports HLS ingestion. Accordingly, the liveStream resource's ingestionType property supports the new value hls to identify streams ingested to YouTube using HLS.

The new Delivering Live YouTube Content via HLS guide provides guidelines for using HLS to stream live content to YouTube from an encoder. The guide aims to help encoder vendors add HLS delivery support to their products.

April 4, 2019

This update contains the following changes:

  • The API reference documentation has been updated to better explain common use cases for each method and to provide dynamic, high-quality code samples through the APIs Explorer widget. See the liveBroadcasts.list method's documentation for an example. There are now two new elements on pages that describe API methods:

    • The APIs Explorer widget lets you select authorization scopes, enter sample parameter and property values, and then send actual API requests and see actual API responses. The widget also offers a fullscreen view that shows complete code samples, which dynamically update to use the scopes and values that you have entered.

    • The Common use cases section describes one or more common use cases for the method explained on the page. For example, you could call the liveBroadcasts.list method to retrieve data about a specific broadcast or to retrieve data about the current user's broadcasts.

      You can use links in that section to populate the APIs Explorer with sample values for your use case or to open the fullscreen APIs Explorer with those values already populated. These changes aim to make it easier for you to see code samples that are directly applicable to the use case that you're trying to implement in your own application.

    Code samples are currently supported for Java, JavaScript, PHP, Python, and curl.

  • The code samples page has also a new UI that offers all of the same features described above. Using that tool, you can explore use cases for different methods, load values into the APIs Explorer, and open the fullscreen APIs Explorer to get code samples in Java, JavaScript, PHP, and Python.

    In conjunction with this change, the pages that previously listed available code samples for Java, PHP, and Python have been removed.

February 25, 2019

The documentation of the liveChatMessage and superChatEvent resources has been updated to reflect the fact that both resources can now contain information about Super Stickers. Super Stickers are a type of Super Chat message that displays an image. Like other Super Chats, a Super Sticker message is purchased by a fan during a YouTube live stream.

  • In a liveChatMessage resource, the snippet.type property is now set to superStickerEvent to indicate that the resource contains information about a Super Sticker. In that case, the resource also contains the snippet.superStickerDetails object, which contains additional information about the Super Sticker.
  • In a superChatEvent resource, the boolean snippet.isSuperStickerEvent indicates whether the Super Chat message is also a Super Sticker. If so, then the snippet.superStickerMetadata object contains additional details about the Super Sticker.

April 5, 2018

The description of the superChatEvents.list method has been updated to reflect the fact that the API response no longer contains fanFundingEvents , which were deprecated in early 2017.

April 3, 2017

New Java code samples have been added that show how to list , insert , and delete live chat messages. The samples call the following methods:

February 13, 2017

This update contains the following changes:

  • Updates to existing resources and methods

    • The liveCuepoints.insert method has been updated to reflect the fact that the onBehalfOfContentOwner parameter is currently required. In addition, the method's description has been updated to note that calls to that method must be authorized by an account associated with a YouTube Content Owner.

February 9, 2017

This update contains the following changes:

  • Updates to existing resources and methods

    • The superChatEvents.list method's new hl parameter lets you specify that the snippet.displayString property value should be formatted according to the conventions of a particular language. That property's definition has also been updated accordingly.

      The parameter value must be a language code included in the list returned by the i18nLanguages.list method. The default value is en , which means that the default behavior is to format display strings as they would be used in English. For example, by default, a string is formatted as $1.00 rather than $1,00 .

۱ فوریه ۲۰۱۷

This update contains the following changes:

  • New resources and methods

    • The new superChatEvent resource represents a Super Chat message purchased by a fan during a YouTube live stream. In the YouTube live chat stream, Super Chats stand out from other messages in two ways:

      • Super Chats are highlighted with a color.
      • Super Chats stay pinned in the ticker for a set period of time.

      The color of the Super Chat, the period of time it stays pinned in the ticker, and the maximum message length are all determined by the purchase amount. The YouTube Help Center has more information about Super Chats.

      The API supports a method to list Super Chat events for a channel's live streams in the previous 30 days. That method also returns data about Fan Funding events ( fanFundingEvents ) from the channel's last live stream.

  • Updates to existing resources and methods

    • The snippet.type property now supports the superChatEvent value, which indicates that the resource describes a Super Chat.

      In addition, the liveChatMessage resource's new snippet.superChatDetails property and its children contain information about the Super Chat event.

    • The liveStream resource's cdn.resolution property now supports the value 2160p .

  • New and updated errors

    • The API supports the following new errors:

      جزئیات خطا
      liveBroadcasts.insert , liveBroadcasts.update The liveBroadcasts.insert and liveBroadcasts.update methods return 400 ( Bad Request ) errors to indicate that the liveBroadcast resource being inserted or updated contains an invalid value for either the contentDetails.enableEmbed property or the contentDetails.projection property. The error reasons for the two new errors are invalidEmbedSetting and invalidProjection , respectively.

January 12, 2017

Note: This is a deprecation announcement.

In conjunction with the release of the new Super Chat feature, YouTube has deprecated the Fan Funding feature, and the Fan Funding API will be turned off on February 28, 2017. As of that date:

۱۱ آگوست ۲۰۱۶

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.

May 20, 2016

YouTube now supports DASH ingestion. Accordingly, the liveStream resource's ingestionType property supports the new value dash to identify streams ingested to YouTube using DASH.

The new Delivering Live YouTube Content via DASH guide provides guidelines for using the DASH Delivery format to stream live data on YouTube from an encoder. It is intended to help encoder vendors add DASH delivery support to their products.

April 18, 2016

This update contains the following changes:

  • Updates to existing resources and methods

    • liveStream resource updates
      • YouTube now supports streams with 1440p resolution at either 30 or 60 frames per second.

        In addition, the liveStream resource contains new properties for specifying the frame rate and resolution of the inbound video data:

        خواص
        cdn.frameRate The frame rate of the inbound video data. Valid values are 30fps and 60fps .
        cdn.resolution The resolution of the inbound video data. Valid property values are: 1440p , 1080p , 720p , 480p , 360p , and 240p .
      • In accordance with the introduction of the liveStream resource's cdn.frameRate and cdn.resolution properties, the resource's cdn.format is now deprecated. The cdn.format property specifies resolution and frame rate in a single value.

        We encourage you to transition to the newly supported fields. In the meantime, cdn.format continues to work. In addition, requests to insert live streams currently succeed as long as you specify values for either the cdn.format property or the cdn.frameRate and cdn.resolution properties. If you provide values for all three properties, the API might return an error if the values are not in agreement.

        Note that even though the cdn.format property is deprecated, it does now support two new values, 1440p and 1440p_hfr , to reflect the API's support for 1440p streams at either 30 or 60 frames per second.

    • liveBroadcast resource updates
    • liveChatMessage resource updates
      • The snippet.type property supports two new values – messageDeletedEvent and userBannedEvent – that correspond to the new properties described in the following bullet point. The definition of the snippet.authorChannelId property has also been updated to explain what the property value identifies for these new message types.

      • The liveChatMessage resource contains the following new properties:

        خواص
        snippet.messageDeletedDetails This object contains information about a message that was deleted by a chat moderator. The object is only present if the snippet.type property value is messageDeletedEvent .
        snippet.userBannedDetails This object contains information about a user who has been banned from participating in the chat. The object also contains information about the ban itself, namely whether the ban is permanent or temporary. If the ban is temporary, one of the object's properties specifies the duration of the ban.

        This object is only present if the snippet.type property value is userBannedEvent .
  • New and updated errors

    • The API supports the following new errors:

      جزئیات خطا
      liveBroadcasts.bind The liveBroadcasts.bind method returns a 403 ( Forbidden ) error to indicate that the user has sent too many requests within a given timeframe. The error reason is userRequestsExceedRateLimit .

      The liveBroadcasts.insert and liveBroadcasts.update methods already support the same error.
      liveStreams.insert The liveStreams.insert method supports four new 400 ( Bad Request ) errors that identify an invalid property value in the liveStream resource that the request tried to insert. The following list identifies the error reasons and the properties with which they are associated:
      liveStreams.insert The liveStreams.insert method supports two new 400 ( Bad Request ) errors, each of which indicates that a required value is not present in the liveStream resource that the request tried to insert. The following list identifies the error reasons and the properties with which they are associated:
      More specifically, when you insert a liveStream resource, you must specify a value for either the cdn.format property or for the cdn.frameRate and cdn.resolution properties.
      • The API returns a formatRequired error if you do not specify a value for any of the three properties.
      • The API returns a frameRateRequired error if you specify a value for cdn.resolution but not cdn.frameRate .
      • The API returns a resolutionRequired error if you specify a value for cdn.frameRate but not cdn.resolution .
      liveStreams.update The liveStreams.update method returns a 403 ( Forbidden ) error if the request tries to modify the value of any of the following non-mutable properties: The reason in the error response is liveStreamModificationNotAllowed .

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 .

December 17, 2015

This update contains the following changes:

  • New resources and methods

    • The API supports several new resources to support chat functionality for live broadcasts. YouTube supports live chat functionality during active live broadcasts, and these resources and their methods support retrieval of chat messages as well as administrative functions for the chat.

      منابع
      liveChatMessage This resource represents a message in a YouTube live chat. YouTube supports several types of messages, including text messages and Fan Funding events. Some message types identify a particular phase of the chat, such as the beginning of a sponsors-only period or the end of the chat. The API supports methods to list, insert, and delete live chat messages.
      liveChatModerators This resource identifies a chat moderator. Moderators can perform some administrative functions, such as banning users from the chat or removing messages. The API supports methods to list, insert, and delete live chat moderators.
      liveChatBans This resource identifies a user who is banned from posting messages to a particular live chat. Bans can be temporary or permanent. The API supports methods to insert and delete live chat bans.
      fanFundingEvents This resource represents a Fan Funding event on a YouTube channel. Fan Funding provides a way for viewers to voluntarily support YouTube Creators with one-time monetary support.

      The API's fanFundingEvents.list method lists a channel's Fan Funding events. Fan Funding events that are initiated through a live chat during a live broadcast owned by the channel also trigger a fanFundingEvent message to the broadcast's live chat.

      Learn more about Fan Funding in the YouTube Help Center .
      sponsors The sponsor resource identifies a sponsor of a YouTube channel. A sponsor pays a monthly fee to a channel. A badge shows up next to the sponsor's messages in the channel's live chats and sponsors can also participate in live chats exclusively for the channel's sponsors, if those occur.

      The API's sponsors.list method lists a channel's sponsors. When users sign up to sponsor a channel during a live broadcast owned by that channel, the API also adds a newSponsorEvent message to the broadcast's live chat.

      Learn more about sponsorships in the YouTube Help Center .

  • Updates to existing resources and methods

    • The liveBroadcast resource contains the following new properties:

      خواص
      snippet.liveChatId The ID for the broadcast's YouTube live chat. With this ID, you can use the liveChatMessage resource's methods to retrieve, insert, or delete chat messages. You can also add or remove chat moderators, ban users from participating in live chats, or remove existing bans.
      contentDetails.closedCaptionsType Note: This property replaces the contentDetails.enableClosedCaptions property.

      This property indicates whether closed captioning is enabled for your broadcast and, if so, what type of closed captions you are providing:
      • closedCaptionsDisabled : Closed captions are disabled for the live broadcast.
      • closedCaptionsHttpPost : You will send captions, via HTTP POST, to an ingestion URL associated with your live stream.
      • closedCaptionsEmbedded : Captions will be encoded in the video stream using EIA-608 and/or CEA-708 formats.
      contentDetails.enableClosedCaptions This property has been deprecated as of December 17, 2015. Use the contentDetails.closedCaptionsType property instead. For API clients that are already using this property:
      • Setting the property value to true is equivalent to setting the contentDetails.closedCaptionsType property to closedCaptionsHttpPost .
      • Setting the property value to false is equivalent to setting the contentDetails.closedCaptionsType property to closedCaptionsDisabled .
    • The liveBroadcasts.list method's new broadcastType parameter lets you filter an API response to include event broadcasts, persistent broadcasts, or all broadcasts.

      A persistent broadcast is one that always exists and is not tied to a particular event. Specifically, a channel's default broadcast is a persistent broadcast, and it is accessible via the Live Dashboard in the YouTube Creator Studio. The channel's other broadcasts are event broadcasts.

  • The liveStream resource's status.healthStatus.configurationIssues[].type field reports the following new health status errors:

    خطاها
    audioTooManyChannels The audio has more than two channels, but only one (mono) or two (stereo) channels are supported. Please correct the number of audio channels.
    frameRateHigh The current framerate is too high. Please set the framerate to %(framerate)s fps or less.
  • The publication date of the previous documentation update was corrected.

  • New and updated errors

    • In addition to errors defined for the new resources listed above, the API supports the following new errors:

      جزئیات خطا
      liveBroadcasts.update
      HTTP Response Code forbidden (403)
      دلیل closedCaptionsTypeModificationNotAllowed
      توضیحات The contentDetails.closedCaptionsType value can only be modified when the broadcast is in the created or ready status.
      liveBroadcasts.update
      HTTP Response Code invalidValue (400)
      دلیل invalidEnableClosedCaptions
      توضیحات In the liveBroadcast resource , the value of the contentDetails.enableClosedCaptions property is incompatible with the value of the contentDetails.closedCaptionType setting. Modify the resource to only include one of the two properties, and then resubmit the request.

August 19, 2015

This update contains the following changes:

  • New resources and methods

    • Note: Documentation for the liveChat resource and its methods is confidential and only visible to select YouTube partners.

      The new liveChat resource contains a comment posted during a live broadcast on YouTube. The API supports two methods for this resource:

      روش‌ها
      liveChats.list List live chat messages for a broadcast.
      liveChats.insert Create a new chat message.

      Live chat messages can only be retrieved and posted while a broadcast is live.

  • Updates to existing resources and methods

    • The liveStream resource contains the following new properties:

      خواص
      snippet.isDefaultStream Indicates whether this stream is the default stream for the channel. A channel's default stream exists indefinitely, does not have a start or end time associated with it, and cannot be deleted. See the property's definition for more information about how default streams work.
      status.healthStatus This object contains information that could be used to identify, diagnose and resolve streaming problems. The object contains a number of child properties to help you evaluate the health of a live video stream.

      In particular, the status.healthStatus.configurationIssues[] object lists issues affecting a video stream. A new document, Configuration Issues for LiveStream Resources , lists all of the issues that the API reports.
      contentDetails.isReusable Indicates whether the stream is reusable, which means that it can be bound to multiple broadcasts. It is common for broadcasters to reuse the same stream for many different broadcasts if those broadcasts occur at different times.
    • The liveBroadcast resource contains the following new properties:

      خواص
      snippet.isDefaultBroadcast Indicates whether this broadcast is the default broadcast for the channel. When a YouTube channel is enabled for live streaming, YouTube creates a default stream and a default broadcast for the channel. The stream defines how the channel owner sends live video to YouTube, and the broadcast is how viewers can see the default stream. See the property's definition for more information about how default broadcasts work.
      contentDetails.enableLowLatency Indicates whether this broadcast should be encoded for low-latency streaming. A low-latency stream can reduce the amount of time it takes for video to be visible to users watching a broadcast, though it can also impact the resolution for viewers of the stream.
      statistics.totalChatCount The total number of live chat messages associated with the broadcast. The property and its value are present if the broadcast is visible to the user and has the live chat feature enabled. Note that this property will not specify a value after the broadcast ends. So, this property would not identify the number of chat messages for an archived video of a completed live broadcast.
  • New and updated errors

    • In addition to errors defined for the new liveChat resource, the API supports the following new error:

      جزئیات خطا
      liveStreams.update
      HTTP Response Code forbidden (403)
      دلیل liveStreamModificationNotAllowed
      توضیحات The API does not allow you to change a reusable stream to be non-reusable, or vice versa. For more information, see Understanding Broadcasts and Streams

May 21, 2015

This update contains the following changes:

  • YouTube now supports live video streaming at 60 frames per second (fps), which means smoother playback for gaming and other fast-action videos. When you start a live stream on YouTube at 60fps, YouTube also makes the stream available in 30fps on devices where high-frame-rate viewing is not yet available.

    The liveStream resource's cdn.format property supports two new values for this feature: 720p_hfr and 1080p_hfr .

    See the YouTube Creators Blog for more information about this feature.

August 21, 2014

This update contains the following changes:

  • The definition of the liveBroadcasts.control method's walltime parameter has been updated to note that the property value is specified in ISO 8601 format ( YYYY-MM-DDThh:mm:ss.sssZ ).

  • The API now supports the following errors:

    Error type Error detail توضیحات
    insufficientPermissions liveStreamingNotEnabled All methods for the liveBroadcast and liveStream resources return this error if the user that authorized the API request has not been enabled to stream live video on YouTube. Details explaining why the user cannot stream live video may be available in the user's channel settings at https://www.youtube.com/features .
    rateLimitExceeded userRequestsExceedRateLimit The liveBroadcasts.insert and liveStreams.insert methods both return this error to indicate that the user has sent too many requests within a given timeframe.

May 2, 2014

This update contains the following changes:

  • The descriptions of the liveStream resource and of the liveBroadcasts.bind method have been updated to note that a broadcast can only be bound to one video stream, but a video stream can be bound to more than one broadcast. This change is solely a correction to the documentation; the underlying API functionality has not changed.

  • The liveBroadcast resource's contentDetails.monitorStream.enableMonitorStream property has been updated to explain that if the property's value is true , then you must transition your broadcast to the testing state before you can transition it to the live state. (If the property's value is false , your broadcast cannot have a testing stage, so you can transition the broadcast directly to the live state.

  • The liveCuepoint resource's settings.offsetTimeMs property has been updated to note that you should not specify a value for the property if your broadcast does not have a monitor stream.

  • All of the methods for the liveBroadcast and liveStream resources now support the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters. These parameters allow you to use the same authorization credentials to complete API requests for different channels associated with the same content owner.

  • The liveCuepoints.insert method's documentation has been updated to note that you can set a value for the settings.walltime property when calling that method.

  • The error documentation now specifies the HTTP response code for each error type.

  • The API now supports the following error:

    Error type Error detail توضیحات
    insufficientPermissions livePermissionBlocked The liveBroadcasts.insert , liveBroadcasts.transition , and liveStreams.insert methods return this error if the user that authorized the request is unable to stream live video on YouTube. Details explaining why the user cannot stream live video may be available in the user's channel settings at https://www.youtube.com/features .
  • The liveBroadcasts.insert method's invalidScheduledStartTime error has been updated to clarify that the scheduled start time must be close enough to the current date that a broadcast could be reliably scheduled at that time.

December 13, 2013

This update contains the following changes:

  • The liveBroadcast resource's new status.recordingStatus property identifies the broadcast's current status.

  • The liveBroadcast resource's new contentDetails.enableClosedCaptions property indicates whether closed captions can be ingested for the broadcast. The property value can be set when you insert or update a broadcast, but it cannot be updated once the broadcast is in the testing or live state. If you set this property to true , then the liveStream resource that is bound to the broadcast will specify the ingestion URL to use for the broadcast's closed captions.

  • The liveBroadcast resource's snippet.scheduledEndTime property now supports broadcasts that are scheduled to continue indefinitely. With this change, the property is no longer required in liveBroadcasts.insert and liveBroadcasts.update requests.

    If you retrieve a liveBroadcast resource that does not specify a value for this property, then the broadcast is scheduled to continue indefinitely. Similarly, if you call the liveBroadcasts.insert or liveBroadcasts.update method and do not specify a value for this property, the broadcast will be scheduled to continue indefinitely.

  • The liveBroadcast resource's contentDetails.recordFromStart property, which already had a default value of true , can now only be set to false if the broadcasting channel is allowed to disable recordings for live broadcasts.

    If your channel does not have permission to disable recordings, and you attempt to insert a broadcast with the recordFromStart property set to false , the API will return a Forbidden error. In addition, if your channel does not have that permission and you attempt to update a broadcast to set the recordFromStart property to false , the API will return a modificationNotAllowed error.

  • The liveBroadcast resource no longer contains an enableArchive property, which had been mentioned in the descriptions of the contentDetails.enableDvr and contentDetails.enableEmbed properties.

  • The list of valid values for the liveBroadcast resource's status.lifeCycleStatus property has been updated to include a description of each status.

  • The liveCuepoint resource's new settings.walltime property specifies the date and time at which the cuepoint should be inserted. The API returns an error if a request tries to insert a cuepoint that specifies a value for this property and for the settings.offsetTimeMs property.

  • The new contentDetails object in a liveStream resource contains information about the stream. Currently, the object's only property is contentDetails.closedCaptionsIngestionUrl , which specifies the ingestion URL for closed captions associated with the video stream.

  • The list of valid values for the liveStream resource's status.streamStatus property has been updated to include a description of each status.

  • The liveBroadcasts.control method's new walltime parameter lets you specify the date and time when a slate change will occur. The API returns an error if a request specifies a value for this parameter and for the offsetTimeMs parameter.

  • In the API response to a liveBroadcasts.list request, the value of the kind property has changed from youtube#liveBroadcastList to youtube#liveBroadcastListResponse .

  • In the API response to a liveStreams.list request, the value of the kind property has changed from youtube#liveStreamList to youtube#liveStreamListResponse .

  • The eventId property has been deprecated from both the liveBroadcastListResponse and the liveStreamListResponse .

  • The API supports the following new errors:

    Error type Error detail توضیحات
    invalidValue conflictingTimeFields The liveBroadcasts.control method returns this error if your request specifies values for the offsetTimeMs and walltime parameters. A request can either omit both parameters or specify a value for one of the two parameters.
    invalidValue invalidWalltime The liveBroadcasts.control method returns this error if the walltime parameter's value is invalid.
    forbidden enableClosedCaptionsModificationNotAllowed The liveBroadcasts.update method returns this error if you attempt to update the contentDetails.enableClosedCaptions value and the broadcast's status is not created or ready .
    invalidValue conflictingTimeFields The liveCuepoints.insert method returns this error if your request specifies values for the settings.offsetTimeMs and settings.walltime properties. A request can either omit both properties or specify a value for one of the two properties.

    In addition, the liveStreams.update method no longer supports a cdnRequired error similar to the one that the liveStreams.insert method supports.

May 10, 2013

This update contains the following changes:

May 2, 2013

This update contains the following changes:

March 27, 2013

This update contains the following changes:

  • The following properties have changed in the liveBroadcast resource:

    • The startWithSlateCuepoint property has been renamed to startWithSlate .
    • The enableArchive property has been renamed to recordFromStart .
    • The slateSettings object has been deprecated and removed from the documentation. Error messages related to the slateSettings object or its properties have also been removed. Finally, the "Displaying Slates" section of the Getting started guide has been removed.

  • The API no longer supports the ability to insert in-stream slates using the liveCuepoints.insert method. The following documents have been updated to reflect this change:

    • The index page , Getting started guide, and Life of a broadcast tutorial no longer mention this functionality.

    • The liveCuepoint resource's settings.cueType property no longer supports slate as a property value. (The only supported value is ad .

    • The liveCuepoint resource's settings.eventState property has been deprecated and removed from the documentation.

March 18, 2013

This update contains the following changes:

  • All of the API's error messages have been updated to more clearly explain possible errors and, when possible, offer guidance about how to fix them.

  • The API may now return several new errors. The list below identifies the error and the API method that might return that error:

    • liveBroadcasts.insert – A broadcast's scheduled end time must be after its scheduled start time.
    • liveBroadcasts.insert – The broadcast specifies an invalid privacy status.
    • liveBroadcasts.update – The resource does not contain or does not set a value for the contentDetails.enableArchive property.
    • liveBroadcasts.update – The resource does not contain or does not set a value for the contentDetails.enableContentEncryption property.
    • liveBroadcasts.update – The resource does not contain or does not set a value for the contentDetails.enableDvr property.
    • liveStreams.insert – The snippet title must be between 1 and 128 characters long.
    • liveStreams.update – The resource does not contain or does not set a value for the snippet.title property.

  • The liveStream resource documentation has been updated to reflect that multicast and WebM are not supported ingestion methods as previously indicated. The list of formats for the cdn.format property has been updated accordingly, and the cdn.multicastIngestionInfo object and its child properties have been removed from the resource's documentation. In addition, http has been removed from the list of supported cdn.ingestionType values.