Last active
July 11, 2016 08:46
-
-
Save ULazdins/e5778cda5fa295af752899b404a3b213 to your computer and use it in GitHub Desktop.
BrokenSimpleSessionImpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BrokenSimpleSessionImpl extends TvInputService.Session { | |
// ... | |
private void setAudioTracks() { | |
List<TvTrackInfo> trackInfoList = new ArrayList<>(); | |
for (int i = 0; i < audioTrackCount; i++) { | |
MediaFormat format = player.getTrackFormat(DemoPlayer.TYPE_AUDIO, i); | |
TvTrackInfo trackInfo = new TvTrackInfo | |
.Builder(TvTrackInfo.TYPE_AUDIO, String.valueOf(i)) | |
.setLanguage("Track " + i) // The only changes are here | |
.build() | |
trackInfoList.add(trackInfo); | |
} | |
notifyTracksChanged(trackInfoList); | |
} | |
@Override | |
public boolean onSelectTrack(int type, String trackId) { | |
Log.d(TAG, String.format("onSelectTrack(%d,%s)", type, trackId)); | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment