Package com.jalios.jcms.media
Class MediaTracksUtils
- java.lang.Object
-
- com.jalios.jcms.media.MediaTracksUtils
-
public class MediaTracksUtils extends java.lang.Object
Utility class for Media track management.
-
-
Constructor Summary
Constructors Constructor Description MediaTracksUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkVttTrackIntegrity(Track track)
Checks if a VTT track has the valid format (containing milliseconds or not).static void
transformSrtTracktoVttTrack(Track track)
Converts a track from SRT to VTT format.
-
-
-
Method Detail
-
transformSrtTracktoVttTrack
public static void transformSrtTracktoVttTrack(Track track) throws java.io.IOException
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:
java.io.IOException
-
checkVttTrackIntegrity
public static void checkVttTrackIntegrity(Track track) throws java.io.IOException
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:
java.io.IOException
-
-