(以下內容均翻譯自英文版文件,最新資訊及內容敬請切換至英文語系參考原文)
縮圖跳轉功能可讓使用者快速瀏覽較長的影片,當他們將游標停在進度列上或跳轉影片時,會顯示與特定時間戳記相關的預覽影像。
要啟用縮圖跳轉功能,請在影片來源配置中新增包含縮圖圖片 URL 的 VTT 檔案:
// Step1. set the vtt with MediaConfig, and load it into player val mediaConfig = MediaConfig( ... thumbnailSeekingUrl = "$THUMBNAIL_URL", ) player.load(mediaConfig) // Step2. get the specified position's thumbnail bitmap val bitmap = player.getThumbnail(positionMs)