সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
SDK অপারেশন মোড
SDK বিজ্ঞাপন সার্ভার থেকে প্রাপ্ত বিজ্ঞাপন প্রতিক্রিয়ার উপর নির্ভর করে এক বা একাধিক মোডে কাজ করতে পারে।
একক বিজ্ঞাপন
একটি বিজ্ঞাপন যা IMAAdsManager এ start মেসেজ পাঠানো হলে যে কোনো সময়ে চালানো যেতে পারে। একটি একক বিজ্ঞাপন চালানোর জন্য কোনো বিশেষ সূচনার প্রয়োজন নেই।
বিজ্ঞাপন পড
IMAAdsManager এ start মেসেজ পাঠানো হলে বেশ কিছু বিজ্ঞাপন দেখা যায়। একটি একক বিজ্ঞাপন পড খেলার জন্য কোন বিশেষ সূচনার প্রয়োজন নেই।
বিজ্ঞাপনের নিয়ম
নির্দিষ্ট বিষয়বস্তুর বিপরীতে নির্দিষ্ট সময়ে নির্ধারিত বিজ্ঞাপন বিরতির একটি প্লেলিস্ট। start বার্তাটি বিজ্ঞাপনের নিয়ম মোডে উপেক্ষা করা হয়। একটি একক প্লেলিস্টের মধ্যে একাধিক বিজ্ঞাপন বিরতি নির্ধারিত হতে পারে (যেমন, প্রি-রোল, মিড-রোল, পোস্ট-রোল)। আরও বাস্তবায়নের বিশদ বিবরণের জন্য, নীচের বিজ্ঞাপনের নিয়ম বিভাগটি দেখুন।
বিজ্ঞাপনের নিয়ম
IMA iOS SDK সম্পূর্ণ স্বয়ংক্রিয় বিজ্ঞাপন প্লেলিস্ট সমর্থন করে। এই বৈশিষ্ট্যটি আপনার বিজ্ঞাপনগুলিকে ট্র্যাফিক করার সময় Google অ্যাড ম্যানেজারে নির্দিষ্ট করা বিষয়বস্তুর মধ্যে বিজ্ঞাপন বিরতিগুলি সন্নিবেশিত করে৷ এটি প্রি-রোল, মিড-রোল এবং পোস্ট-রোল সহ বিজ্ঞাপন বিরতিগুলিকে সমর্থন করার জন্য প্রয়োজনীয় ভিডিও প্লেয়ার কোডটিকেও ব্যাপকভাবে সরল করে৷
অ্যাড ম্যানেজারে বিজ্ঞাপনগুলি পাচার করার সময়, "সর্বদা বিষয়বস্তুর শুরুতে বিজ্ঞাপন বিরতি চালান" বা "কন্টেন্টের প্রতি 30 মিনিটে এক মিনিটের বিজ্ঞাপন বিরতি চালান" এর মতো বিভিন্ন বিজ্ঞাপনের নিয়মগুলি নির্দিষ্ট করা সম্ভব।
বিজ্ঞাপনের অনুরোধ করা হলে, বিজ্ঞাপন সার্ভার একটি বিজ্ঞাপন প্লেলিস্ট ফেরত দিতে পারে। SDK প্লেলিস্ট প্রক্রিয়া করে এবং স্বয়ংক্রিয়ভাবে নির্দিষ্ট করা বিজ্ঞাপন বিরতির সময়সূচী করে।
AdsManager শুরু করার সময়, একটি IMAContentPlayhead অবজেক্ট initializeWithContentPlayhead:adsRenderingSettings: কলের মাধ্যমে পাস করা হয়। আপনি যদি আপনার সামগ্রী প্রদর্শনের জন্য একটি AVPlayer ব্যবহার করেন, আপনি যখন আপনার adDisplayContainer তৈরি করেন তখন আপনি SDK-এ IMAAVPlayerContentPlayhead এর একটি উদাহরণ পাস করেন। এই অবজেক্টটি কন্টেন্ট প্লেব্যাকের অগ্রগতি ট্র্যাক করতে ব্যবহার করা হয় যাতে অ্যাড ম্যানেজারে নির্দিষ্ট সময়ে বিজ্ঞাপন বিরতিগুলি স্বয়ংক্রিয়ভাবে ঢোকানো হয়।
আপনার ভিডিও প্লেয়ারের বর্তমান সময় ফেরত দিতে currentTime প্রয়োগ করুন।
initializeWithContentPlayhead:self ব্যবহার করতে IMAAdsManager ইনিশিয়ালাইজেশন কল পরিবর্তন করুন।
IMAAdsManagerDelegate বিজ্ঞাপন বিরতি চালানোর সাথে সাথে বিষয়বস্তু বিরতি এবং পুনরায় শুরু করতে ব্যবহৃত হয়।
দ্রষ্টব্য: যখন বিষয়বস্তু বাজানো শেষ হয়ে যায় বা ব্যবহারকারী প্লেব্যাক বন্ধ করে দেয়, তখন SDK-কে সংকেত দেওয়ার জন্য IMAAdsLoader এ contentComplete কল করতে ভুলবেন না যে কন্টেন্ট প্লে করা শেষ হয়েছে। SDK তারপর পোস্ট-রোল বিজ্ঞাপন বিরতি চালায়, যদি একটি নির্ধারিত থাকে। ALL_ADS_COMPLETED ইভেন্ট উত্থাপিত হয় যখন সমস্ত বিজ্ঞাপন বিরতি খেলা হয়। এছাড়াও, মনে রাখবেন যে IMAAdsManager এর initializeWithContentPlayhead:adsRenderingSettings মেথড কল করা হলে কন্টেন্ট ট্র্যাকিং শুরু হয় এবং কন্টেন্ট প্লে করার আগে আপনার সর্বদা initializeWithContentPlayhead:adsRenderingSettings কল করা উচিত।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Google IMA iOS SDK allows you to integrate ads into your video content using a WebView for ad requests, parsing, tracking, and rendering.\u003c/p\u003e\n"],["\u003cp\u003eIt supports three main operation modes: single ad, ad pod (multiple ads played back-to-back), and ad rules for scheduled ad breaks.\u003c/p\u003e\n"],["\u003cp\u003eAd rules simplify ad integration by automating ad playlist management based on Google Ad Manager settings, requiring an \u003ccode\u003eIMAContentPlayhead\u003c/code\u003e for content tracking.\u003c/p\u003e\n"],["\u003cp\u003eThe SDK utilizes the \u003ccode\u003eIMAAdsManagerDelegate\u003c/code\u003e to control content playback during ad breaks and requires signaling content completion via \u003ccode\u003econtentComplete\u003c/code\u003e for post-roll ads.\u003c/p\u003e\n"]]],[],null,["# Automate ad playlists\n\n| **Note:** The iOS SDK uses a WebView to load a JavaScript back end. This WebView is used to make ad requests, parse responses, ping tracking URLs, and render the ad UI.\n\nSDK operation modes\n-------------------\n\nThe SDK can operate in one or more modes, depending on the ad response it receives from the ad\nserver.\n\nSingle ad\n: An ad that can be played at any time when the `start`\n message is sent to the `IMAAdsManager`. No special initialization\n is necessary to play a single ad.\n:\n\nAd pod\n: Several ads that play back to back when the `start` message is sent to\n the `IMAAdsManager`. No special initialization is necessary to\n play a single ad pod.\n\nAd rules\n: A playlist of ad breaks scheduled at certain times against particular\n content. The `start` message is ignored in ad rules mode. There can\n be several ad breaks scheduled within a single playlist (e.g., pre-roll,\n mid-roll, post-roll). For further implementation details, see the\n [Ad Rules](#ad-rules) section below.\n\nAd rules\n--------\n\nIMA iOS\nSDK supports fully automated ad playlists. This feature\ninserts ad breaks into the content as specified in\n[Google Ad Manager](//admanager.google.com/)\nwhen trafficking your ads. It also greatly simplifies the video player code\nnecessary to support ad breaks, including pre-rolls, mid-rolls, and post-rolls.\n\n- When trafficking ads in Ad Manager, it is possible to specify various ad rules like \"always play ad break at the beginning of the content\" or \"play a one-minute ad break every 30 minutes of content\".\n- When ads are requested, the ad server can return an ad playlist. The SDK processes the playlist and automatically schedules the ad breaks that have been specified.\n- When initializing the `AdsManager`, an `IMAContentPlayhead` object is passed in via the `initializeWithContentPlayhead:adsRenderingSettings:` call. If you are using an AVPlayer to display your content, you pass an instance of `IMAAVPlayerContentPlayhead` to the SDK when you create your `adDisplayContainer`. This object is used to track the progress of the content playback so ad breaks are automatically inserted at the times specified in Ad Manager. \n\n **With AVPlayer:** \n\n ```objective-c\n IMAContentPlayhead *contentPlayhead =\n [[IMAAVPlayerContentPlayhead alloc] initWithAVPlayer:self.contentAVPlayer];\n IMAAdsRequest *request = [[IMAAdsRequest alloc] initWithAdTagUrl:adTagUrl\n adDisplayContainer:adDisplayContainer\n contentPlayhead:contentPlayhead\n userContext:nil];\n ```\n\n **Without AVPlayer:**\n 1. Implement the `IMAContentPlayhead` interface.\n 2. Implement `currentTime` to return the current time of your video player.\n 3. Change the `IMAAdsManager` initialization call to use `initializeWithContentPlayhead:self`.\n- The [IMAAdsManagerDelegate](/interactive-media-ads/docs/sdks/ios/client-side/reference/Protocols/IMAAdsManagerDelegate) is used to pause and resume the content as ad breaks are played.\n\n**Note:** When the content has finished playing or\nthe user has stopped playback, be sure to call `contentComplete`\non the `IMAAdsLoader` in order to signal to the SDK that the content\nhas finished playing. The SDK then plays the post-roll ad break, if one has been scheduled.\nThe `ALL_ADS_COMPLETED` event is raised when all ad breaks have\nbeen played. In addition, note that content tracking begins when\n`IMAAdsManager`'s `initializeWithContentPlayhead:adsRenderingSettings`\nmethod is called and you should always call `initializeWithContentPlayhead:adsRenderingSettings`\nbefore playing content."]]