Package com.jalios.jcms.media
Class MediaTracksUtils
java.lang.Object
com.jalios.jcms.media.MediaTracksUtils
Utility class for Media track management.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckVttTrackIntegrity(Track track) Checks if a VTT track has the valid format (containing milliseconds or not).static voidtransformSrtTracktoVttTrack(Track track) Converts a track from SRT to VTT format.
-
Constructor Details
-
MediaTracksUtils
public MediaTracksUtils()
-
-
Method Details
-
transformSrtTracktoVttTrack
Converts a track from SRT to VTT format. Implementation details : only SRT files are supported, using a very naive parsing for now.- Parameters:
track- the track to be converted- Throws:
IOException
-
checkVttTrackIntegrity
Checks if a VTT track has the valid format (containing milliseconds or not). If not, the method performs a correction (adds milliseconds to timestamps).- Parameters:
track- the track to be checked and corrected if needed- Throws:
IOException
-