건너뛴 광고 시점으로 돌아가기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
동영상 게시자는
미드롤 광고를 지나칠 수 있습니다 사용자가 광고 시점 이후로 탐색하면 광고 시점의 시작 부분으로 다시 이동한 후 광고 시점이 완료되면 탐색 위치로 돌아갈 수 있습니다. 이
'스냅백'이라고 부릅니다.
예를 들어 아래 다이어그램을 참고하세요. 시청자가 동영상을 시청하고 있을 때
5분 표시에서 15분 표시까지 탐색하기로 결정합니다.
그러나 원하는 10분 표시 시점에 광고 시점이
다음 콘텐츠를 시청하기 전에 미리 볼 수 있습니다.

이 광고 시점을 표시하려면 다음 단계를 따르세요.
- 사용자가 시청하지 않은 광고 시점을 넘어서 탐색했는지 확인합니다.
그렇다면 광고 시점으로 돌아가세요.
- 광고 시점이 완료되면 원래 탐색으로 되돌립니다.
이를 다이어그램 형식으로 표현하면 다음과 같습니다.

다음은 IMA DAI SDK를 사용하여
Snapack을 구현하는 방법입니다
고급 예
탐색이 광고 시점을 시청하지 않은 상태로 남겨두지 않도록 방지
사용자가 시청하지 않은 광고 시점을 지나 탐색을 실행했는지 확인합니다.
그렇다면 광고 시점으로 돌아가세요.
Roku 고급 샘플은 사용자가 탐색할 때 리모컨 버튼을 누르는 것을 사용합니다. 사용자가 앞으로 버튼을 누를 때마다 스트림에서 설정된 시간만큼 앞으로 이동합니다. 똑같음
이 점프를 처리하는 메서드는
광고를 넘기거나 광고 시점으로 옮기고, 그럴 경우
를 추가할 수 있습니다.
Function handleFastForward(player as Object, streamManager as Object, updatedTime As Integer)
previousAd = streamManager.getPreviousCuePoint(updatedTime)
If previousAd = Invalid or previousAd.hasPlayed
player.seek(updatedTime * 1000)
Else If previousAd.start > player.currentTime
player.isSnapback = True
player.timeAfterSnapback = updatedTime
player.seek(previousAd.start * 1000 + 1000)
End If
End Function
사용자를 원래 탐색으로 되돌리기
adBreakEnded
핸들러에서 이전 광고가
스냅백의 결과로 재생되었습니다. 이 경우
해당 사용자가 처음에 찾고자 했던 장소로 이동합니다 (길이가
이는 방금 재생된 광고 시점의 중간이 아니기 때문입니다.
player.adBreakEnded = Function(adBreakInfo as Object)
If m.isSnapback
m.seek(m.timeAfterSnapback * 1000)
m.isSnapback = False
End If
End Function
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-21(UTC)
[null,null,["최종 업데이트: 2025-08-21(UTC)"],[[["\u003cp\u003eSnapback prevents viewers from skipping mid-roll ads by returning them to the start of the ad break if they attempt to seek past it.\u003c/p\u003e\n"],["\u003cp\u003eWhen snapback is triggered, viewers are taken back to the ad and then returned to their original seek location after the ad completes.\u003c/p\u003e\n"],["\u003cp\u003eImplementing snapback involves checking for seeks past unwatched ad breaks and redirecting the viewer, then returning them to their desired location afterwards.\u003c/p\u003e\n"],["\u003cp\u003eThe provided code snippets demonstrate how to implement snapback using the IMA DAI SDK, handling seek events and ad break endings.\u003c/p\u003e\n"]]],[],null,["# Return to a skipped ad break\n\nAs a video publisher, you may want to prevent your viewers from\nseeking past your mid-roll ads. When a user seeks past an ad break,\nyou can take them back to the start of that ad break, and then return\nthem to their seek location after that ad break has completed. This\nfeature is called \"snapback.\"\n\nAs an example, see the diagram below. Your viewer is watching a video,\nand decides to seek from the 5-minute mark to the 15-minute mark.\nThere is, however, an ad break at the 10-minute mark that you want\nthem to watch before they can watch the content after it:\n\nIn order to show this ad break, take the following steps:\n\n1. Check if the user ran a seek that jumped past an unwatched ad break, and if so, take them back to the ad break.\n2. After the ad break completes, return them to their original seek.\n\nIn diagram form, that looks like this:\n\nHere's how to implement snapack using the IMA DAI SDK, as demonstrated in our\n[Advanced Example](//github.com/googleads/googleads-ima-roku-dai).\n\nPrevent a seek from leaving an ad break unwatched\n-------------------------------------------------\n\nCheck if the user has run a seek that went past an unwatched ad break,\nand if so, take them back to the ad break.\nThe Roku advanced sample relies on remote button presses for the\nuser to seek - each time the user presses the forward button, they\njump forward in the stream by a set number of seconds. The same\nmethod that handles this jump also checks to see if the jump\ntakes/ them past or into an ad break, and if it does, sends the user\nto the start of that ad break instead: \n\n Function handleFastForward(player as Object, streamManager as Object, updatedTime As Integer)\n previousAd = streamManager.getPreviousCuePoint(updatedTime)\n If previousAd = Invalid or previousAd.hasPlayed\n player.seek(updatedTime * 1000)\n Else If previousAd.start \u003e player.currentTime\n player.isSnapback = True\n player.timeAfterSnapback = updatedTime\n player.seek(previousAd.start * 1000 + 1000)\n End If\n End Function\n\nPut the user back to their original seek\n----------------------------------------\n\nIn your `adBreakEnded` handler, check to see if the previous ad\nbreak was played as the result of snapback. If so, return the\nuser to the place they were trying to seek to initially (as long\nas it wasn't the middle of the ad break that just played): \n\n player.adBreakEnded = Function(adBreakInfo as Object)\n If m.isSnapback\n m.seek(m.timeAfterSnapback * 1000)\n m.isSnapback = False\n End If\n End Function"]]