commit
d79f8f64de
@ -1,22 +1,27 @@
|
||||
# Release notes #
|
||||
|
||||
### r2.0.4 ###
|
||||
|
||||
This release contains important bug fixes. Users of earlier r2.0.x versions
|
||||
should proactively update to this version.
|
||||
|
||||
* Fix crash on Jellybean devices when using playback controls
|
||||
([#1965](https://github.com/google/ExoPlayer/issues/1965)).
|
||||
|
||||
### r2.0.3 ###
|
||||
|
||||
This release contains important bug fixes. Users of r2.0.0, r2.0.1 and r2.0.2
|
||||
should proactively update to this version.
|
||||
|
||||
* Fixed NullPointerException in ExtractorMediaSource
|
||||
([#1914](https://github.com/google/ExoPlayer/issues/1914).
|
||||
([#1914](https://github.com/google/ExoPlayer/issues/1914)).
|
||||
* Fixed NullPointerException in HlsMediaPeriod
|
||||
([#1907](https://github.com/google/ExoPlayer/issues/1907).
|
||||
([#1907](https://github.com/google/ExoPlayer/issues/1907)).
|
||||
* Fixed memory leak in PlaybackControlView
|
||||
([#1908](https://github.com/google/ExoPlayer/issues/1908).
|
||||
([#1908](https://github.com/google/ExoPlayer/issues/1908)).
|
||||
* Fixed strict mode violation when using
|
||||
SimpleExoPlayer.setVideoPlayerTextureView().
|
||||
* Fixed L3 Widevine provisioning
|
||||
([#1925](https://github.com/google/ExoPlayer/issues/1925).
|
||||
([#1925](https://github.com/google/ExoPlayer/issues/1925)).
|
||||
* Fixed hiding of controls with use_controller="false"
|
||||
([#1919](https://github.com/google/ExoPlayer/issues/1919).
|
||||
([#1919](https://github.com/google/ExoPlayer/issues/1919)).
|
||||
* Improvements to Cronet network stack extension.
|
||||
* Misc bug fixes.
|
||||
|
||||
|
@ -35,7 +35,7 @@ allprojects {
|
||||
releaseRepoName = 'exoplayer'
|
||||
releaseUserOrg = 'google'
|
||||
releaseGroupId = 'com.google.android.exoplayer'
|
||||
releaseVersion = 'r2.0.3'
|
||||
releaseVersion = 'r2.0.4'
|
||||
releaseWebsite = 'https://github.com/google/ExoPlayer'
|
||||
}
|
||||
}
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.google.android.exoplayer2.demo"
|
||||
android:versionCode="2003"
|
||||
android:versionName="2.0.3">
|
||||
android:versionCode="2004"
|
||||
android:versionName="2.0.4">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
|
@ -23,7 +23,7 @@ public interface ExoPlayerLibraryInfo {
|
||||
/**
|
||||
* The version of the library, expressed as a string.
|
||||
*/
|
||||
String VERSION = "2.0.3";
|
||||
String VERSION = "2.0.4";
|
||||
|
||||
/**
|
||||
* The version of the library, expressed as an integer.
|
||||
@ -32,7 +32,7 @@ public interface ExoPlayerLibraryInfo {
|
||||
* corresponding integer version 1002003 (001-002-003), and "123.45.6" has the corresponding
|
||||
* integer version 123045006 (123-045-006).
|
||||
*/
|
||||
int VERSION_INT = 2000003;
|
||||
int VERSION_INT = 2000004;
|
||||
|
||||
/**
|
||||
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
|
||||
|
@ -44,6 +44,7 @@ import java.util.Collections;
|
||||
private static final int SUFFIX_SEI_NUT = 40;
|
||||
|
||||
private TrackOutput output;
|
||||
private SampleReader sampleReader;
|
||||
private SeiReader seiReader;
|
||||
|
||||
// State that should not be reset on seek.
|
||||
@ -56,7 +57,6 @@ import java.util.Collections;
|
||||
private final NalUnitTargetBuffer pps;
|
||||
private final NalUnitTargetBuffer prefixSei;
|
||||
private final NalUnitTargetBuffer suffixSei; // TODO: Are both needed?
|
||||
private final SampleReader sampleReader;
|
||||
private long totalBytesWritten;
|
||||
|
||||
// Per packet state that gets reset at the start of each packet.
|
||||
@ -72,7 +72,6 @@ import java.util.Collections;
|
||||
pps = new NalUnitTargetBuffer(PPS_NUT, 128);
|
||||
prefixSei = new NalUnitTargetBuffer(PREFIX_SEI_NUT, 128);
|
||||
suffixSei = new NalUnitTargetBuffer(SUFFIX_SEI_NUT, 128);
|
||||
sampleReader = new SampleReader(output);
|
||||
seiWrapper = new ParsableByteArray();
|
||||
}
|
||||
|
||||
@ -91,6 +90,7 @@ import java.util.Collections;
|
||||
@Override
|
||||
public void init(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) {
|
||||
output = extractorOutput.track(idGenerator.getNextId());
|
||||
sampleReader = new SampleReader(output);
|
||||
seiReader = new SeiReader(extractorOutput.track(idGenerator.getNextId()));
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.google.android.exoplayer2.ui;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.os.SystemClock;
|
||||
@ -75,6 +76,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
private ExoPlayer player;
|
||||
private VisibilityListener visibilityListener;
|
||||
|
||||
private boolean isAttachedToWindow;
|
||||
private boolean dragging;
|
||||
private int rewindMs;
|
||||
private int fastForwardMs;
|
||||
@ -264,7 +266,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
removeCallbacks(hideAction);
|
||||
if (showTimeoutMs > 0) {
|
||||
hideAtMs = SystemClock.uptimeMillis() + showTimeoutMs;
|
||||
if (isAttachedToWindow()) {
|
||||
if (isAttachedToWindow) {
|
||||
postDelayed(hideAction, showTimeoutMs);
|
||||
}
|
||||
} else {
|
||||
@ -279,7 +281,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
}
|
||||
|
||||
private void updatePlayPauseButton() {
|
||||
if (!isVisible() || !isAttachedToWindow()) {
|
||||
if (!isVisible() || !isAttachedToWindow) {
|
||||
return;
|
||||
}
|
||||
boolean playing = player != null && player.getPlayWhenReady();
|
||||
@ -291,7 +293,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
}
|
||||
|
||||
private void updateNavigation() {
|
||||
if (!isVisible() || !isAttachedToWindow()) {
|
||||
if (!isVisible() || !isAttachedToWindow) {
|
||||
return;
|
||||
}
|
||||
Timeline currentTimeline = player != null ? player.getCurrentTimeline() : null;
|
||||
@ -315,7 +317,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
}
|
||||
|
||||
private void updateProgress() {
|
||||
if (!isVisible() || !isAttachedToWindow()) {
|
||||
if (!isVisible() || !isAttachedToWindow) {
|
||||
return;
|
||||
}
|
||||
long duration = player == null ? 0 : player.getDuration();
|
||||
@ -350,13 +352,18 @@ public class PlaybackControlView extends FrameLayout {
|
||||
private void setButtonEnabled(boolean enabled, View view) {
|
||||
view.setEnabled(enabled);
|
||||
if (Util.SDK_INT >= 11) {
|
||||
view.setAlpha(enabled ? 1f : 0.3f);
|
||||
setViewAlphaV11(view, enabled ? 1f : 0.3f);
|
||||
view.setVisibility(VISIBLE);
|
||||
} else {
|
||||
view.setVisibility(enabled ? VISIBLE : INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
private void setViewAlphaV11(View view, float alpha) {
|
||||
view.setAlpha(alpha);
|
||||
}
|
||||
|
||||
private String stringForTime(long timeMs) {
|
||||
if (timeMs == C.TIME_UNSET) {
|
||||
timeMs = 0;
|
||||
@ -426,6 +433,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
isAttachedToWindow = true;
|
||||
if (hideAtMs != C.TIME_UNSET) {
|
||||
long delayMs = hideAtMs - SystemClock.uptimeMillis();
|
||||
if (delayMs <= 0) {
|
||||
@ -440,6 +448,7 @@ public class PlaybackControlView extends FrameLayout {
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
isAttachedToWindow = false;
|
||||
removeCallbacks(updateProgressAction);
|
||||
removeCallbacks(hideAction);
|
||||
}
|
||||
|
@ -17,8 +17,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.google.android.exoplayer2.playbacktests"
|
||||
android:versionCode="2003"
|
||||
android:versionName="2.0.3">
|
||||
android:versionCode="2004"
|
||||
android:versionName="2.0.4">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user