Để thảo luận và đưa ra ý kiến phản hồi về các sản phẩm của chúng tôi, hãy tham gia kênh Discord chính thức của Ad Manager trong máy chủ Cộng đồng quảng cáo và đo lường của Google.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
SDK IMA dành cho tvOS cho phép đặt bối cảnh phát liên tục cho
yêu cầu quảng cáo. Chiến lược phát hành đĩa đơn
continuousPlayback
tài sản thông báo cho SDK biết liệu trình phát có ý định liên tục phát các video nội dung hay không
lần lượt, tương tự như chương trình phát sóng trên truyền hình. Khi bạn đặt thành true, các quảng cáo được trả về từ
yêu cầu là những yêu cầu được máy chủ quảng cáo chỉ định là phù hợp để phát liên tục. Không phải
chỉ định giá trị cho
cơ sở lưu trú này
để cài đặt là không xác định.
Mẫu sau đây minh hoạ cách thiết lập tính năng phát liên tục trong một yêu cầu quảng cáo.
Sự khác biệt giữa tính năng phát liên tục và tính năng tự động phát quảng cáo
SDK IMA cho tvOS cũng cho phép đặt xem người chơi có bắt đầu chơi hay không
tự động hoặc chờ hành động của người dùng bắt đầu phát. Việc này được thực hiện bằng cách sử dụng
adWillAutoPlay
thuộc tính này. Khi bạn đặt thành true, quảng cáo trả về là những quảng cáo do quảng cáo chỉ định
máy chủ phù hợp với môi trường tự động phát.
Bảng này trình bày chi tiết khi nào bạn nên yêu cầu quảng cáo phát liên tục và tự động phát, dựa vào nội dung video
quảng cáo tương ứng.
Nội dung video
Giá trị cho tính năng Phát liên tục
Giá trị cho adWillAutoPlay
Một video có nội dung phát theo tương tác của người dùng
false
false
Một video có nội dung tự động phát
false
true
Danh sách phát video phát video đầu tiên khi người dùng tương tác nhưng tự động phát
video đang theo dõi
true
false
Danh sách phát video tự động phát video đầu tiên và tự động phát các video sau
[null,null,["Cập nhật lần gần đây nhất: 2025-08-01 UTC."],[[["\u003cp\u003eThe IMA SDK for tvOS allows you to set the \u003ccode\u003econtinuousPlayback\u003c/code\u003e property on ad requests to indicate if content videos will play continuously, influencing the types of ads returned.\u003c/p\u003e\n"],["\u003cp\u003eSetting \u003ccode\u003econtinuousPlayback\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e signals that videos will play one after another, similar to a TV broadcast, and retrieves ads designated for continuous play.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eadWillAutoPlay\u003c/code\u003e property determines whether ads will start playing automatically or require user interaction to begin.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided table to align \u003ccode\u003econtinuousPlayback\u003c/code\u003e and \u003ccode\u003eadWillAutoPlay\u003c/code\u003e settings with your specific video content behavior, such as single videos or playlists with autoplay functionality.\u003c/p\u003e\n"]]],[],null,["# Report continuous play\n\nThe IMA SDK for tvOS allows for setting the continuous play context for an ads request. The `\n`[continuousPlayback](/interactive-media-ads/docs/sdks/tvos/client-side/reference/Classes/IMAAdsRequest#continuousplayback) property notifies the SDK whether the player intends to continuously play the content videos one after another, similar to a TV broadcast. When set to `true`, the ads returned from the request are those designated by the ads server as suitable for continuous play. Not specifying a value for this property leaves the setting as unknown. **Note:** Changing this setting has no impact on ad playback.\nThe following sample demonstrates how to set continuous play in an ads request. \n\n### Objective-C\n\n```objective-c\nIMAAdsRequest *request = [[IMAAdsRequest alloc]\n initWithAdTagUrl:adTagUrl\n adDisplayContainer:[self createAdDisplayContainer]\n avPlayerVideoDisplay:[[IMAAVPlayerVideoDisplay alloc] initWithAVPlayer:self.contentPlayer]\n pictureInPictureProxy:self.pictureInPictureProxy\n userContext:nil];\n request.continuousPlayback = true;\n [self.adsLoader requestAdsWithRequest:request];\n```\n\n### Swift\n\n```swift\nlet request = IMAAdsRequest(\n adTagUrl: adTagUrl,\n adDisplayContainer: createAdDisplayContainer(),\n avPlayerVideoDisplay: IMAAVPlayerVideoDisplay(avPlayer: contentPlayer),\n pictureInPictureProxy: pictureInPictureProxy,\n userContext: nil)\nrequest.continuousPlayback = true;\nadsLoader!.requestAds(with: request)\n```\n\nHow continuous play differs from ad auto-play\n---------------------------------------------\n\nThe IMA SDK for tvOS also allows for setting whether the player will start playing automatically or wait for user action to begin playing. This is done using the `\n`[adWillAutoPlay](/interactive-media-ads/docs/sdks/tvos/client-side/reference/Classes/IMAAdsRequest#adwillautoplay) property. When set to `true`, the ads returned are those designated by the ads server as suitable for an auto-play environment.\n\n\nThis table details when to request ads for continuous play and auto-play, based on the video content\nthe ads are paired with.\n\n| Video Content | Value for continuousPlayback | Value for adWillAutoPlay |\n|------------------------------------------------------------------------------------------------------|------------------------------|--------------------------|\n| A single content video that plays upon user interaction | `false` | `false` |\n| A single content video that autoplays | `false` | `true` |\n| A video playlist that plays the first video upon user interaction but autoplays the following videos | `true` | `false` |\n| A video playlist that autoplays the first video and autoplays the following videos | `true` | `true` |"]]