Pour discuter de nos produits et nous faire part de vos commentaires, rejoignez le canal Discord officiel Ad Manager sur le serveur de la communauté Google Advertising and Measurement.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
AdPodInfo
classpublic
Classe représentant un objet d'informations sur le bloc d'annonces lors de l'insertion d'annonces dynamiques.
Méthodes
getAdPosition
getAdPosition() renvoie un nombre
Renvoie
number
getMaxDuration
getMaxDuration() renvoie un nombre
Renvoie
number
getPodIndex
getPodIndex() renvoie un nombre
Renvoie l'index de la série d'annonces.
VOD DAI: pour un pod pré-roll, renvoie 0. Pour les midrolls, renvoie 1, 2,...,N.
Pour un pod postroll, renvoie -1. La valeur par défaut est 0 si cette annonce ne fait pas partie d'un pod ou si ce pod ne fait pas partie d'une playlist.
Flux en direct pour l'insertion dynamique d'annonces: pour un lot d'annonces pré-roll, renvoie 0. Pour les midrolls, renvoie l'ID de coupure. Renvoie -2 si l'index du pod ne peut pas être déterminé (erreur interne).
Renvoie
number
getTimeOffset
getTimeOffset() renvoie un nombre
Renvoie
number
getTotalAds
getTotalAds() renvoie un nombre
Renvoie
number
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (UTC)."],[[["`AdPodInfo` provides details about ad pods during dynamic ad insertion, including position, maximum duration, and total ads."],["The `getPodIndex()` method returns the index of the ad pod, varying for pre-roll, mid-roll, and post-roll placements in VOD and live streams."],["Other methods within the `AdPodInfo` class allow access to the ad position within the pod, the maximum allowed duration for ads, and the time offset for ad insertion."]]],["The `AdPodInfo` class provides information about ad pods in dynamic ad insertion. Key actions include retrieving: the ad's position within the pod (`getAdPosition`), the maximum duration of the pod (`getMaxDuration`), and the ad pod's index (`getPodIndex`). `getPodIndex` returns different values for VOD and live streams, indicating preroll, midroll, and postroll status. Additionally, the class allows access to the time offset (`getTimeOffset`) and the total number of ads in the pod (`getTotalAds`).\n"]]