diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index d659025e..04c4bb2c 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -307,18 +307,7 @@ class ReactExoplayerView extends FrameLayout implements } private MediaSource buildTextSource(String title, Uri uri, String mimeType, String language) { - String sampleType; - switch (mimeType) { - case "srt": - sampleType = MimeTypes.APPLICATION_SUBRIP; - break; - case "vtt": - sampleType = MimeTypes.TEXT_VTT; - break; - default: - return null; - } - Format textFormat = Format.createTextSampleFormat(title, sampleType, Format.NO_VALUE, language); + Format textFormat = Format.createTextSampleFormat(title, mimeType, Format.NO_VALUE, language); return new SingleSampleMediaSource(uri, mediaDataSourceFactory, textFormat, C.TIME_UNSET); }