Java Code Examples for android.media.MediaPlayer#TrackInfo
The following examples show how to use
android.media.MediaPlayer#TrackInfo .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TrackInfosFactory.java From no-player with Apache License 2.0 | 5 votes |
NoPlayerTrackInfos createFrom(MediaPlayer mediaPlayer) { MediaPlayer.TrackInfo[] mediaPlayerTrackInfos = mediaPlayer.getTrackInfo(); List<NoPlayerTrackInfo> trackInfos = new ArrayList<>(mediaPlayerTrackInfos.length); for (MediaPlayer.TrackInfo mediaPlayerTrackInfo : mediaPlayerTrackInfos) { trackInfos.add(new NoPlayerTrackInfo(mediaPlayerTrackInfo)); } return new NoPlayerTrackInfos(trackInfos); }
Example 2
Source File: AndroidTrackInfo.java From JZVideoDemo with MIT License | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 3
Source File: AndroidTrackInfo.java From DanDanPlayForAndroid with MIT License | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 4
Source File: AndroidTrackInfo.java From GiraffePlayer with Apache License 2.0 | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 5
Source File: AndroidTrackInfo.java From AndroidTvDemo with Apache License 2.0 | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 6
Source File: ReactVideoView.java From react-native-video with MIT License | 5 votes |
private void selectTimedMetadataTrack(MediaPlayer mp) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { return; } 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) { mp.selectTrack(i); break; } } } catch (Exception e) {} }
Example 7
Source File: AndroidTrackInfo.java From ShareBox with Apache License 2.0 | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 8
Source File: AndroidTrackInfo.java From MediaSDK with Apache License 2.0 | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 9
Source File: AndroidTrackInfo.java From MKVideoPlayer with MIT License | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 10
Source File: AndroidTrackInfo.java From talk-android with MIT License | 5 votes |
private static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 11
Source File: AndroidTrackInfo.java From WliveTV with Apache License 2.0 | 5 votes |
public static AndroidTrackInfo[] fromTrackInfo(MediaPlayer.TrackInfo[] trackInfos) { if (trackInfos == null) return null; AndroidTrackInfo androidTrackInfo[] = new AndroidTrackInfo[trackInfos.length]; for (int i = 0; i < trackInfos.length; ++i) { androidTrackInfo[i] = new AndroidTrackInfo(trackInfos[i]); } return androidTrackInfo; }
Example 12
Source File: PAudioPlayer.java From PHONK with GNU General Public License v3.0 | 4 votes |
public MediaPlayer.TrackInfo[] getInfo() { return mMediaPlayer.getTrackInfo(); }
Example 13
Source File: AndroidTrackInfo.java From LivePlayback with Apache License 2.0 | 4 votes |
public AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 14
Source File: AndroidTrackInfo.java From talk-android with MIT License | 4 votes |
private AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 15
Source File: AndroidTrackInfo.java From TvPlayer with Apache License 2.0 | 4 votes |
public AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 16
Source File: AndroidTrackInfo.java From MKVideoPlayer with MIT License | 4 votes |
private AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 17
Source File: AndroidTrackInfo.java From ShareBox with Apache License 2.0 | 4 votes |
private AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 18
Source File: AndroidTrackInfo.java From AndroidTvDemo with Apache License 2.0 | 4 votes |
private AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 19
Source File: AndroidTrackInfo.java From JZVideoDemo with MIT License | 4 votes |
private AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }
Example 20
Source File: AndroidTrackInfo.java From MediaSDK with Apache License 2.0 | 4 votes |
private AndroidTrackInfo(MediaPlayer.TrackInfo trackInfo) { mTrackInfo = trackInfo; }