DAI ストリームをブックマークする場合は、ストリームの ID と時間を記録する必要がある
ユーザーが動画を終了したときユーザーが戻ったら、
保存された時間までシークできます。リクエストされた各インスタンスは、
ストリームを保存するだけで、再生時間の異なるミッドロール挿入点を設定できます。
時間が機能しないことがあります。本当にやりたいのは、同じマシンから
コンテンツ時間。
その問題を解決するための変換方法
IMA DAI SDK には、コンテンツ時刻をリクエストする 2 つのメソッドが用意されています。
特定の配信時刻と配信時刻の
あります。これらの変換方法を使用すると、ブックマークに追加した
コンテンツ時間を指定してから、そのコンテンツ時間の
ストリームの新しいインスタンスが作成されます(リンクを含む)
動作中のブックマーク実装を示すサンプルアプリにアクセスできます。
publicvoidloadUrl(Stringurl,List<HashMap<String,String>>subtitles){//Setvideoplayer's stream URL and subtitles, and play the stream....//Bookmarking.if(bookmarkTime > 0){doublestreamTime=streamManager.getStreamTimeForContentTime(bookmarkTime);videoPlayer.seek((long)(streamTime*1000.0));//stoms.}}
[[["わかりやすい","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"]],["最終更新日 2025-03-20 UTC。"],[[["This guide explains how to implement bookmarking in video-on-demand (VOD) streams using the IMA DAI SDK for a seamless viewing experience."],["Bookmarking involves saving the user's content time, not just stream time, to ensure accurate playback resumption."],["The IMA DAI SDK provides methods to convert between stream time and content time for bookmarking purposes."],["Developers can save bookmarks when the activity is paused and load them when the stream is re-requested."],["A sample app demonstrating bookmarking implementation is available on GitHub."]]],["Bookmarking in IMA DAI involves saving the user's position in a video stream for later continuation. Instead of recording the stream time, the key is to save the content time. When a user leaves, record the stream ID and convert the current stream time to content time using `getContentTimeForStreamTime()`. Upon return, re-request the stream and use `getStreamTimeForContentTime()` to find the corresponding stream time to seek to. Bookmarks are saved when the `Activity` pauses and loaded when re-requesting a stream.\n"]]