Skip to content

Commit

Permalink
Add note about catching selectTimedMetadataTrack exception
Browse files Browse the repository at this point in the history
  • Loading branch information
cobarx authored Dec 13, 2018
1 parent 4670144 commit b485e64
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ private void selectTimedMetadataTrack(MediaPlayer mp) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return;
}
try {
try { // It's possible this could throw an exception if the framework doesn't support getting track info
MediaPlayer.TrackInfo[] trackInfo = mp.getTrackInfo();
for (int i = 0; i < trackInfo.length; ++i) {
if (trackInfo[i].getTrackType() == MediaPlayer.TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT) {
Expand Down

0 comments on commit b485e64

Please sign in to comment.