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 boolean |
isClosedCaptionsEnabled(BaseVideoView videoView)
Utility method to check if closed captions are enabled.
|
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 view