Commit b850b31f authored by Hampton Maxwell's avatar Hampton Maxwell
Browse files

Return empty string instead of null if text track title or language are not set

parent e684ba65
Loading
Loading
Loading
Loading
+2 −2
Changes for android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -520,9 +520,9 @@ class ReactExoplayerView extends FrameLayout implements
             Format format = groups.get(i).getFormat(0);
             WritableMap textTrack = Arguments.createMap();
             textTrack.putInt("index", i);
             textTrack.putString("title", format.id);
             textTrack.putString("title", format.id != null ? format.id : "");
             textTrack.putString("type", format.sampleMimeType);
             textTrack.putString("language", format.language);
             textTrack.putString("language", format.language != null ? format.language : "");
             textTracks.pushMap(textTrack);
        }
        return textTracks;