public final class VideoUtil
extends java.lang.Object
| Constructor and Description |
|---|
VideoUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addCaptions(Video video,
java.util.Map<java.lang.String,java.lang.String> languageCodeCaptionsMap)
Adds the
Video.Fields#CAPTION_SOURCES video property with the languageCodeCaptionsMap,
if and on only if, the Video.Fields#CAPTION_SOURCES doesn't exist. |
static void |
addClosedCaptionLanguagesMapToVideo(Video video)
Queries the CAPTION_SOURCES Video property, and builds a Map of language/label references.
|
static void |
addWatermarkingToken(Video video,
java.lang.String token)
Add a watermarking token to this video's sources if a placeholder is present
|
static boolean |
isClosedCaptionsEnabled(BaseVideoView videoView)
Utility method to check if closed captions are enabled.
|
static void |
removeSidecarClosedCaptionSources(Video video)
Removes existing Sidecar Captions Sources because they are likely not aligned with the Ad breaks
in the VMAP for SSAI videos.
|
static boolean |
toggleClosedCaptions(BaseVideoView videoView)
Utility method to toggle the closed captions.
|
public static boolean addCaptions(@NonNull
Video video,
@NonNull
java.util.Map<java.lang.String,java.lang.String> languageCodeCaptionsMap)
Video.Fields#CAPTION_SOURCES video property with the languageCodeCaptionsMap,
if and on only if, the Video.Fields#CAPTION_SOURCES doesn't exist.video - The video to add the captions to.languageCodeCaptionsMap - A map of language code to caption urls.public static boolean toggleClosedCaptions(@NonNull
BaseVideoView videoView)
videoView - the video viewpublic static boolean isClosedCaptionsEnabled(@NonNull
BaseVideoView videoView)
videoView - the video viewpublic static void addClosedCaptionLanguagesMapToVideo(@NonNull
Video video)
public static void removeSidecarClosedCaptionSources(@NonNull
Video video)
public static void addWatermarkingToken(Video video, java.lang.String token)
video - The video that may have a token placeholder in its Source URLstoken - The watermarking token that will replace he placeholder in the Source URLs