Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/video_player/video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.7

* Update exoplayer to 2.14.1, removing dependency on Bintray.

## 2.1.6

* Remove obsolete pre-1.0 warning from README.
Expand Down
14 changes: 4 additions & 10 deletions packages/video_player/video_player/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ rootProject.allprojects {
repositories {
google()
mavenCentral()
// Gradle versions older than 2.13.3 aren't published to the servers
// above, so add this URL as a workaround until upgrading past that
// version.
maven {
url 'https://google.bintray.com/exoplayer/'
}
}
}

Expand Down Expand Up @@ -50,10 +44,10 @@ android {
}

dependencies {
implementation 'com.google.android.exoplayer:exoplayer-core:2.12.1'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.12.1'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.12.1'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.12.1'
implementation 'com.google.android.exoplayer:exoplayer-core:2.14.1'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.14.1'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.14.1'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.14.1'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-inline:3.9.0'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.PlaybackParameters;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Player.EventListener;
import com.google.android.exoplayer2.Player.Listener;
import com.google.android.exoplayer2.SimpleExoPlayer;
import com.google.android.exoplayer2.audio.AudioAttributes;
import com.google.android.exoplayer2.source.MediaSource;
Expand All @@ -29,7 +29,6 @@
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
import com.google.android.exoplayer2.util.Util;
import io.flutter.plugin.common.EventChannel;
import io.flutter.view.TextureRegistry;
Expand Down Expand Up @@ -77,15 +76,13 @@ final class VideoPlayer {

DataSource.Factory dataSourceFactory;
if (isHTTP(uri)) {
DefaultHttpDataSourceFactory httpDataSourceFactory =
new DefaultHttpDataSourceFactory(
"ExoPlayer",
null,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
true);
DefaultHttpDataSource.Factory httpDataSourceFactory =
new DefaultHttpDataSource.Factory()
.setUserAgent("ExoPlayer")
.setAllowCrossProtocolRedirects(true);

if (httpHeaders != null && !httpHeaders.isEmpty()) {
httpDataSourceFactory.getDefaultRequestProperties().set(httpHeaders);
httpDataSourceFactory.setDefaultRequestProperties(httpHeaders);
}
dataSourceFactory = httpDataSourceFactory;
} else {
Expand Down Expand Up @@ -157,7 +154,6 @@ private MediaSource buildMediaSource(

private void setupVideoPlayer(
EventChannel eventChannel, TextureRegistry.SurfaceTextureEntry textureEntry) {

eventChannel.setStreamHandler(
new EventChannel.StreamHandler() {
@Override
Expand All @@ -176,7 +172,7 @@ public void onCancel(Object o) {
setAudioAttributes(exoPlayer, options.mixWithOthers);

exoPlayer.addListener(
new EventListener() {
new Listener() {
private boolean isBuffering = false;

public void setBuffering(boolean buffering) {
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter
widgets on Android, iOS, and web.
repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.1.6
version: 2.1.7

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down