This file contains 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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
+ xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.google.android.exoplayer2.ui.SimpleExoPlayerView android:id="@+id/player" | |
android:layout_width="match_parent" | |
- android:layout_height="match_parent"/> | |
+ android:layout_height="match_parent" | |
+ app:resize_mode="fill"/> |
This file contains 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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.google.android.exoplayer2.ui.SimpleExoPlayerView android:id="@+id/player" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"/> | |
</FrameLayout> |
This file contains 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
Tracks [ | |
Renderer:0 [ | |
Group:0, adaptive_supported=YES [ | |
[X] Track:0, id=0, mimeType=video/avc, bitrate=499000, res=640x360, supported=YES | |
[X] Track:1, id=1, mimeType=video/avc, bitrate=2356000, res=1276x716, supported=YES | |
[X] Track:2, id=2, mimeType=video/avc, bitrate=4870000, res=1920x1080, supported=YES | |
[X] Track:3, id=3, mimeType=video/avc, bitrate=6998000, res=1920x1080, supported=YES | |
] | |
] | |
Renderer:1 [ |
This file contains 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
MediaSource firstSource = new ExtractorMediaSource(firstVideoUri, ...); | |
MediaSource secondSource = new ExtractorMediaSource(secondVideoUri, ...); | |
// Plays the first video twice, then the second video. | |
ConcatenatingMediaSource concatenatedSource = | |
new ConcatenatingMediaSource(firstSource, firstSource, secondSource); | |
// Loops the sequence indefinitely. | |
LoopingMediaSource compositeSource = new LoopingMediaSource(concatenatedSource); |
This file contains 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
MediaSource videoSource = new ExtractorMediaSource(mp4VideoUri, ...); | |
// The source is provided to the player for playback. | |
player.prepare(videoSource, true); |
This file contains 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
MediaSource videoSource = new ExtractorMediaSource(videoUri, ...); | |
MediaSource subtitleSource = new SingleSampleMediaSource(subtitleUri, ...); | |
// Plays the video with the sideloaded subtitle. | |
MergingMediaSource mergedSource = new MergingMediaSource(videoSource, subtitleSource); |
This file contains 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
MediaSource firstSource = new ExtractorMediaSource(firstVideoUri, ...); | |
MediaSource secondSource = new ExtractorMediaSource(secondVideoUri, ...); | |
// Plays the first video twice. | |
LoopingMediaSource firstSourceTwice = new LoopingMediaSource(firstSource, 2); | |
// Plays the first video twice, then the second video. | |
ConcatenatingMediaSource concatenatedSource = | |
new ConcatenatingMediaSource(firstSourceTwice, secondSource); | |
// Loops the sequence indefinitely. | |
LoopingMediaSource compositeSource = new LoopingMediaSource(concatenatedSource); |
This file contains 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
MediaSource source = new ExtractorMediaSource(videoUri, ...); | |
// Loops the video indefinitely. | |
LoopingMediaSource loopingSource = new LoopingMediaSource(source); |
This file contains 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
MediaSource firstSource = new ExtractorMediaSource(firstVideoUri, ...); | |
MediaSource secondSource = new ExtractorMediaSource(secondVideoUri, ...); | |
// Plays the first video, then the second video. | |
ConcatenatingMediaSource concatenatedSource = | |
new ConcatenatingMediaSource(firstSource, secondSource); |
NewerOlder