نمای کلی برای پخش جریانی زنده
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Pod Serving API دسترسی به غلافهای تبلیغات ویدیویی با نرخ بیت تطبیقی را فراهم میکند که بهگونهای تهیه شدهاند که میتوان آنها را مستقیماً در فهرست پخش رسانهای HLS یا MPEG DASH قرار داد.
این API برای ناشران پیشرفته و شرکای فناوری ویدیو در نظر گرفته شده است. استفاده از این API در مقیاس مستلزم طراحی و پیاده سازی یک گردش کار سرویس دهی پیچیده است که خارج از محدوده این مستندات است.
پیش نیازها
قبل از پردازش پخش زنده از طریق DAI Podserving API، باید یک رویداد پخش زنده با استفاده از رابط کاربری Google Ad Manager یا API رویداد زنده ایجاد کنید.
اجزاء
سه جزء وجود دارد که هر پیاده سازی Pod Serving API را تشکیل می دهد: Google Ad Manager، یک پخش کننده ویدیوی مشتری، و یک سرور دستکاری مانیفست.

مدیر تبلیغات
Ad Manager مسئول ارائه تبلیغات به کاربر است و می توان آن را از طریق Ad Manager SDK یا رابط وب آن مدیریت کرد. این سرویس دارای وظایف زیر است:
- دریافت درخواستهای پخش جریانی از پخشکننده ویدیوی مشتری، تصمیمگیری برای تبلیغات و ارائه بازخوانی برای مطابقت با نمایههای رمزگذاری محتوای شما
- پاسخ به درخواستهای بخش آگهی از پخشکننده ویدیوی مشتری و ارائه بخش مناسب از غلاف آگهی برای کاربر معین
- دریافت و پردازش پینگ های ردیابی از پخش کننده ویدیوی مشتری
پخش کننده ویدیوی مشتری
پخش کننده ویدیوی مشتری برنامه یا وب سایتی است که مشتریان برای پخش جریان ویدیوی حاصل از آن استفاده می کنند. بازیکن این وظایف را دارد:
- راهاندازی یک منبع جریان از Ad Manager و دریافت یک شی جریان که یک جلسه پخش واحد از یک رویداد پخش زنده خاص را نشان میدهد.
- درخواست مانیفست جریان از سرور دستکاری مانیفست، که پخش را شروع می کند
- نظرسنجی دورهای فراداده غلاف آگهی از Ad Manager که رویدادهای تبلیغاتی تعبیهشده در بخشهای تبلیغاتی جریان را توصیف میکند.
- گوش دادن به رویدادهای فراداده زمانبندیشده توسط پخشکننده که حاوی شناسههای رسانه آگهی هستند. پس از مواجهه با این رویدادها، بازیکن آنها را به Ad Manager ارسال می کند تا تأیید کند که رویدادهای تبلیغاتی با موفقیت انجام شده است.
برای کسب اطلاعات بیشتر در مورد اجرای صحیح پخش کننده ویدیوی مشتری، راهنمای سرویس پاد برای پلتفرم خود را ببینید:
برای پیاده سازی های سفارشی، راهنمای سرویس گیرنده سرویس غلاف ما برای API DAI را ببینید.
سرور دستکاری مانیفست
سرور دستکاری مانیفست سروری است که مسئول میزبانی مانیفست جریان ارائه شده به پخش کننده ویدیوی مشتری است. سرور این وظایف را دارد:
- رسیدگی به تحویل مانیفست به پخش کننده ویدیوی مشتری
- درخواست یک الگوی دوره از Ad Manager (فقط برای جریانهای MPEG DASH)، برای پر کردن بخشهای تبلیغاتی.
- درج نشانیهای وب بخش آگهی میزبانی شده توسط Ad Manager در مانیفست جریان ویدیو (برای HLS) یا دوره تبلیغات (برای MPEG DASH) در طول وقفههای تبلیغاتی.
- ارائه مانیفست اصلاح شده به پخش کننده ویدیوی مشتری.
برای کسب اطلاعات بیشتر در مورد اجرای سرور دستکاری مانیفست سفارشی، به راهنمای دستکاری مانیفست مراجعه کنید.
واژه نامه
- رویداد پخش زنده : رویدادی که دادههای پیکربندی مهم را برای پخش زنده ذخیره میکند، مانند رمزگذاری نمایهها. رویدادهای پخش زنده با استفاده از Ad Manager ایجاد می شوند.
- شئ جریان : شیئی که یک جلسه پخش واحد از یک دارایی ویدیویی خاص را نشان می دهد. ویژگیهای قابل توجه شامل شناسه جریان و نشانی اینترنتی تأیید رسانه است.
- Ad pod : گروه بندی ویدیوهای تبلیغاتی که در یک وقفه تبلیغاتی نشان داده می شوند
- بخشهای آگهی : فایلهای بخش رسانه برای استراحت آگهی
- فراداده غلاف آگهی : فراداده برای وقفه تبلیغاتی که برای ارائه رابط کاربری تبلیغات در مشتری استفاده می شود. به عنوان مثال، دکمه های پنهان کردن جستجو در طول تبلیغات
- شناسه رسانه تبلیغاتی : فراداده به عنوان برچسب ID3 در فایلهای بخش تبلیغات کدگذاری شده است. این ابرداده برای شناسایی زمانی که رویدادهای مرتبط با آگهی خاص در حین پخش رخ داده است، مانند شروع یا نقطه میانی آگهی، استفاده می شود.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-01 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-01 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe Pod Serving API facilitates the integration of adaptive-bitrate video ad pods directly into HLS or MPEG DASH media playlists for advanced publishers and video technology partners.\u003c/p\u003e\n"],["\u003cp\u003eImplementing the Pod Serving API involves three core components: Google Ad Manager, which handles ad delivery and tracking; a client video player, which manages stream initialization and playback; and a manifest manipulation server, which modifies and serves the stream manifest.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, a livestream event must be created via the Google Ad Manager UI or the live-event API, serving as a configuration resource for the livestream.\u003c/p\u003e\n"],["\u003cp\u003eThe client video player is responsible for initializing the stream, requesting the manifest, polling for ad pod metadata, and forwarding timed metadata events to Ad Manager.\u003c/p\u003e\n"],["\u003cp\u003eThe manifest manipulation server handles manifest delivery, requests ad period templates, and inserts Ad Manager-hosted ad segment URLs or ad periods into the stream manifest during ad breaks.\u003c/p\u003e\n"]]],[],null,["# Overview for live streams\n\nThe Pod Serving API provides access to adaptive-bitrate video ad pods prepared\nin such a way that they can be stitched directly into a user-facing HLS or MPEG\nDASH media playlist.\n\nThis API is intended for advanced publishers and video technology partners.\nUsing this API at scale requires design and implementation of a sophisticated\nmedia serving workflow which is outside the scope of this documentation.\n\nPrerequisites\n-------------\n\nBefore processing a livestream through the DAI Podserving API, you\nwill need to create a\n[livestream event](/ad-manager/dynamic-ad-insertion/api/pod-serving/live/manipulator#livestreamevent)\nusing the Google Ad Manager UI, or the live-event API.\n\nComponents\n----------\n\nThere are three components that make up any implementation of the Pod Serving\nAPI: Google Ad Manager, a client video player, and a manifest manipulation\nserver.\n\n### Ad Manager\n\nAd Manager is responsible for delivering ads to the user and can be managed\nthrough either the Ad Manager SDK or its web interface. The service has these\nresponsibilities:\n\n- Receiving stream requests from the client video player, decisioning ads, and providing renditions to match your content encoding profiles\n- Responding to ad segment requests from the client video player and providing the appropriate portion of the ad pod for the given user\n- Receiving and processing tracking pings from the client video player\n\n### Client video player\n\nThe client video player is the app or website that clients use to play the\nresulting video stream. The player has these responsibilities:\n\n- Initializing a stream resource from Ad Manager and receiving a stream object that represents a single playback session of a specific livestream event.\n- Requesting a stream manifest from the manifest manipulation server, which starts playback\n- Periodically polling ad pod metadata from Ad Manager that describes the ad events embedded in the stream's ad segments\n- Listening for timed metadata events raised by the player that contain ad media IDs. Upon encountering these events, the player forwards them to Ad Manager to verify that ad events have successfully occurred.\n\nTo learn more about the proper implementation of the client video player, see\nthe pod serving guide for your platform:\n\n- [Android](/ad-manager/dynamic-ad-insertion/sdk/android?service=pod)\n- [HTML5](/ad-manager/dynamic-ad-insertion/sdk/html5?service=pod)\n- [iOS](/ad-manager/dynamic-ad-insertion/sdk/ios?service=pod)\n- [tvOS](/ad-manager/dynamic-ad-insertion/sdk/tvos?service=pod)\n\nFor custom implementations, see our [pod serving client guide for the DAI\nAPI](/ad-manager/dynamic-ad-insertion/api/pod-serving/live/client).\n\n### Manifest manipulation server\n\nThe manifest manipulation server is the server in charge of hosting the\nstream manifest provided to the client video player. The server has these\nresponsibilities:\n\n- Handling manifest delivery to the client video player\n- Requesting a period template from Ad Manager (for MPEG DASH streams only), to populate with ad segments.\n- Inserting Ad Manager-hosted ad segment URLs into the video stream manifest (for HLS) or ad period (for MPEG DASH) during ad breaks.\n- Serving the modified manifest to the client video player.\n\nTo learn more about implementing a custom manifest manipulator server, see the\n[manifest manipulation\nguide](/ad-manager/dynamic-ad-insertion/api/pod-serving/live/manipulator).\n\nGlossary\n--------\n\n- **Livestream event**: An event that stores important configuration data for livestream, such as encoding profiles. Livestream events are created using Ad Manager.\n- **Stream object**: An object that represents a single playback session of a specific video asset. Notable properties include the stream ID and the media verification URL.\n- **Ad pod**: Grouping of ad videos shown in an ad break\n- **Ad segments**: Media segment files for the ad break\n- **Ad pod metadata**: Metadata for the ad break used to render ad UI on the client; for example, hide seek buttons during ad\n- **Ad media ID**: Metadata encoded as ID3 tags within ad segment files. This metadata is used to identify when specific ad-related events have occurred during playback, such as ad start or midpoint."]]