ציון קצב הנתונים ופורמט המדיה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תשובות VAST יכולות להכיל כמה קובצי מדיה עם קצבי העברת נתונים שונים ובפורמטים שונים. ערכת ה-SDK בוחרת את קצב העברת הנתונים המתאים על סמך תנאי הרשת הנוכחיים:
- מקסימום 500 kbit/s לחיבור לרשת סלולרית
- ללא הגבלה ב-Wi-Fi
אם רוצים לציין את פורמטי הווידאו וקצב העברת הנתונים המועדפים, צריך להשתמש במופע של AdsRenderingSettings כדי להעביר את המידע הזה בזמן האתחול של Ads Manager.
function onAdsManagerLoaded(adsManagerLoadedEvent) {
const adsRenderingSettings = new google.ima.AdsRenderingSettings();
adsRenderingSettings.bitrate = 1024; //kbits
adsRenderingSettings.mimeTypes = [ 'video/mp4', 'video/webm’ ];
adsManager = adsManagerLoadedEvent.getAdsManager(
videoContent, adsRenderingSettings);
...
}
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-09-04 (שעון UTC).
[null,null,["עדכון אחרון: 2025-09-04 (שעון UTC)."],[[["\u003cp\u003eVAST responses may include multiple media files with varying bitrates and formats, with the SDK automatically selecting the optimal bitrate based on network conditions (500 kbit/s maximum for cellular and unlimited for WiFi).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize preferred video formats and bitrates by utilizing an \u003ccode\u003eAdsRenderingSettings\u003c/code\u003e instance during Ads Manager initialization to specify desired settings like bitrate and MIME types.\u003c/p\u003e\n"]]],[],null,["Select platform: [HTML5](/interactive-media-ads/docs/sdks/html5/client-side/bitrates-formats \"View this page for the HTML5 platform docs.\") [Android](/interactive-media-ads/docs/sdks/android/client-side/bitrates-formats \"View this page for the Android platform docs.\") [iOS](/interactive-media-ads/docs/sdks/ios/client-side/bitrates-formats \"View this page for the iOS platform docs.\") [tvOS](/interactive-media-ads/docs/sdks/tvos/client-side/bitrates-formats \"View this page for the tvOS platform docs.\")\n\nVAST responses can contain multiple media files with different\nbitrates and in different formats. The SDK chooses the appropriate bitrate\nbased on the current network conditions:\n\n- max 500 kbit/s for cellular connection\n- unlimited for WiFi\n\nIf you want to specify preferred video formats and bitrate, use an\n[AdsRenderingSettings](/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings)\ninstance to pass this information at the time of Ads Manager initialization. \n\n```gdscript\nfunction onAdsManagerLoaded(adsManagerLoadedEvent) {\n const adsRenderingSettings = new google.ima.AdsRenderingSettings();\n adsRenderingSettings.bitrate = 1024; //kbits\n adsRenderingSettings.mimeTypes = [ 'video/mp4', 'video/webm' ];\n adsManager = adsManagerLoadedEvent.getAdsManager(\n videoContent, adsRenderingSettings);\n ...\n}\n```"]]