google.ima.settings.setDisableCustomPlaybackForIOS10Plus(true);
adDisplayContainer =
new google.ima.AdDisplayContainer(containerElement, contentVideoElement);
adsLoader = new google.ima.AdsLoader(adDisplayContainer);
การเปลี่ยนแปลง HTML จะช่วยให้มั่นใจได้ว่าเนื้อหาของคุณจะเล่นในวิดีโอเพลเยอร์เล่นในหน้า
iPhone แทนที่จะเป็นโปรแกรมเล่นแบบเต็มหน้าจอที่เป็นค่าเริ่มต้นของ iPhone และจะเริ่มต้นในสถานะปิดเสียง
การเปลี่ยนแปลง JavaScript ทำให้ IMA SDK ใช้โปรแกรมเล่นวิดีโอของตนเองเพื่อเล่นโฆษณา
แทนการนำโปรแกรมเล่นเนื้อหาของคุณมาใช้ซ้ำอย่างที่เคยบน iPhone
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-10-15 UTC"],[[["Starting with Chrome 53 and iOS 10, inline video playback and muted autoplay are supported on Android and iPhone."],["This guide provides modifications for the simple sample to enable this functionality, requiring inline video player use for skippable ads and disabling custom playback on iPhones."],["Updates include adding `playsinline` attribute to the video element in HTML and calling `google.ima.settings.setDisableCustomPlaybackForIOS10Plus(true)` in JavaScript."],["These changes ensure content plays inline on iPhone, preventing default fullscreen and utilizing IMA SDK's video player for ad playback instead of the content player."],["Note that fullscreen implementations relying on `videoPlayer.requestFullscreen()` will break with this change as fullscreen with skippable ads on iPhone is currently unsupported by IMA SDK."]]],[]]