mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
commit
936f074e8e
9 changed files with 77 additions and 35 deletions
|
|
@ -1,24 +1,34 @@
|
||||||
# Release notes #
|
# Release notes #
|
||||||
|
|
||||||
|
### r2.1.1 ###
|
||||||
|
|
||||||
|
Bugfix release only. Users of r2.1.0 and r2.0.x should proactively update to
|
||||||
|
this version.
|
||||||
|
|
||||||
|
* Fix some subtitle types (e.g. WebVTT) being displayed out of sync
|
||||||
|
([#2208](https://github.com/google/ExoPlayer/issues/2208)).
|
||||||
|
* Fix incorrect position reporting for on-demand HLS media that includes
|
||||||
|
EXT-X-PROGRAM-DATE-TIME tags
|
||||||
|
([#2224](https://github.com/google/ExoPlayer/issues/2224)).
|
||||||
|
* Fix issue where playbacks could get stuck in the initial buffering state if
|
||||||
|
over 1MB of data needs to be read to initialize the playback.
|
||||||
|
|
||||||
### r2.1.0 ###
|
### r2.1.0 ###
|
||||||
|
|
||||||
This release contains important bug fixes. Users of r2.0.x should proactively
|
|
||||||
update to this version.
|
|
||||||
|
|
||||||
* HLS: Support for seeking in live streams
|
* HLS: Support for seeking in live streams
|
||||||
([87](https://github.com/google/ExoPlayer/issues/87)).
|
([#87](https://github.com/google/ExoPlayer/issues/87)).
|
||||||
* HLS: Improved support:
|
* HLS: Improved support:
|
||||||
* Support for EXT-X-PROGRAM-DATE-TIME
|
* Support for EXT-X-PROGRAM-DATE-TIME
|
||||||
([747](https://github.com/google/ExoPlayer/issues/747)).
|
([#747](https://github.com/google/ExoPlayer/issues/747)).
|
||||||
* Improved handling of sample timestamps and their alignment across variants
|
* Improved handling of sample timestamps and their alignment across variants
|
||||||
and renditions.
|
and renditions.
|
||||||
* Fix issue that could cause playbacks to get stuck in an endless initial
|
* Fix issue that could cause playbacks to get stuck in an endless initial
|
||||||
buffering state.
|
buffering state.
|
||||||
* Correctly propagate BehindLiveWindowException instead of
|
* Correctly propagate BehindLiveWindowException instead of
|
||||||
IndexOutOfBoundsException exception
|
IndexOutOfBoundsException exception
|
||||||
([1695](https://github.com/google/ExoPlayer/issues/1695)).
|
([#1695](https://github.com/google/ExoPlayer/issues/1695)).
|
||||||
* MP3/MP4: Support for ID3 metadata, including embedded album art
|
* MP3/MP4: Support for ID3 metadata, including embedded album art
|
||||||
([979](https://github.com/google/ExoPlayer/issues/979)).
|
([#979](https://github.com/google/ExoPlayer/issues/979)).
|
||||||
* Improved customization of UI components. You can read about customization of
|
* Improved customization of UI components. You can read about customization of
|
||||||
ExoPlayer's UI components
|
ExoPlayer's UI components
|
||||||
[here](https://medium.com/google-exoplayer/customizing-exoplayers-ui-components-728cf55ee07a#.9ewjg7avi).
|
[here](https://medium.com/google-exoplayer/customizing-exoplayers-ui-components-728cf55ee07a#.9ewjg7avi).
|
||||||
|
|
@ -31,30 +41,30 @@ update to this version.
|
||||||
* Support SCTE-35 splice information messages.
|
* Support SCTE-35 splice information messages.
|
||||||
* Support multiple table sections in a single PSI section.
|
* Support multiple table sections in a single PSI section.
|
||||||
* Fix NullPointerException when an unsupported stream type is encountered
|
* Fix NullPointerException when an unsupported stream type is encountered
|
||||||
([2149](https://github.com/google/ExoPlayer/issues/2149)).
|
([#2149](https://github.com/google/ExoPlayer/issues/2149)).
|
||||||
* Avoid failure when expected ID3 header not found
|
* Avoid failure when expected ID3 header not found
|
||||||
([1966](https://github.com/google/ExoPlayer/issues/1966)).
|
([#1966](https://github.com/google/ExoPlayer/issues/1966)).
|
||||||
* Improvements to the upstream cache package.
|
* Improvements to the upstream cache package.
|
||||||
* Support caching of media segments for DASH, HLS and SmoothStreaming. Note
|
* Support caching of media segments for DASH, HLS and SmoothStreaming. Note
|
||||||
that caching of manifest and playlist files is still not supported in the
|
that caching of manifest and playlist files is still not supported in the
|
||||||
(normal) case where the corresponding responses are compressed.
|
(normal) case where the corresponding responses are compressed.
|
||||||
* Support caching for ExtractorMediaSource based playbacks.
|
* Support caching for ExtractorMediaSource based playbacks.
|
||||||
* Improved flexibility of SimpleExoPlayer
|
* Improved flexibility of SimpleExoPlayer
|
||||||
([2102](https://github.com/google/ExoPlayer/issues/2102)).
|
([#2102](https://github.com/google/ExoPlayer/issues/2102)).
|
||||||
* Fix issue where only the audio of a video would play due to capability
|
* Fix issue where only the audio of a video would play due to capability
|
||||||
detection issues ([2007](https://github.com/google/ExoPlayer/issues/2007))
|
detection issues ([#2007](https://github.com/google/ExoPlayer/issues/2007))
|
||||||
([2034](https://github.com/google/ExoPlayer/issues/2034))
|
([#2034](https://github.com/google/ExoPlayer/issues/2034))
|
||||||
([2157](https://github.com/google/ExoPlayer/issues/2157)).
|
([#2157](https://github.com/google/ExoPlayer/issues/2157)).
|
||||||
* Fix issues that could cause ExtractorMediaSource based playbacks to get stuck
|
* Fix issues that could cause ExtractorMediaSource based playbacks to get stuck
|
||||||
buffering ([1962](https://github.com/google/ExoPlayer/issues/1962)).
|
buffering ([#1962](https://github.com/google/ExoPlayer/issues/1962)).
|
||||||
* Correctly set SimpleExoPlayerView surface aspect ratio when an active player
|
* Correctly set SimpleExoPlayerView surface aspect ratio when an active player
|
||||||
is attached ([2077](https://github.com/google/ExoPlayer/issues/1976)).
|
is attached ([#2077](https://github.com/google/ExoPlayer/issues/1976)).
|
||||||
* OGG: Fix playback of short OGG files
|
* OGG: Fix playback of short OGG files
|
||||||
([1976](https://github.com/google/ExoPlayer/issues/1976)).
|
([#1976](https://github.com/google/ExoPlayer/issues/1976)).
|
||||||
* MP4: Support `.mp3` tracks
|
* MP4: Support `.mp3` tracks
|
||||||
([2066](https://github.com/google/ExoPlayer/issues/2066)).
|
([#2066](https://github.com/google/ExoPlayer/issues/2066)).
|
||||||
* SubRip: Don't fail playbacks if SubRip file contains negative timestamps
|
* SubRip: Don't fail playbacks if SubRip file contains negative timestamps
|
||||||
([2145](https://github.com/google/ExoPlayer/issues/2145)).
|
([#2145](https://github.com/google/ExoPlayer/issues/2145)).
|
||||||
* Misc bugfixes.
|
* Misc bugfixes.
|
||||||
|
|
||||||
### r2.0.4 ###
|
### r2.0.4 ###
|
||||||
|
|
@ -185,11 +195,11 @@ V2 release.
|
||||||
|
|
||||||
* Improvements to the upstream cache package.
|
* Improvements to the upstream cache package.
|
||||||
* MP4: Support `.mp3` tracks
|
* MP4: Support `.mp3` tracks
|
||||||
([2066](https://github.com/google/ExoPlayer/issues/2066)).
|
([#2066](https://github.com/google/ExoPlayer/issues/2066)).
|
||||||
* SubRip: Don't fail playbacks if SubRip file contains negative timestamps
|
* SubRip: Don't fail playbacks if SubRip file contains negative timestamps
|
||||||
([2145](https://github.com/google/ExoPlayer/issues/2145)).
|
([#2145](https://github.com/google/ExoPlayer/issues/2145)).
|
||||||
* MPEG-TS: Avoid failure when expected ID3 header not found
|
* MPEG-TS: Avoid failure when expected ID3 header not found
|
||||||
([1966](https://github.com/google/ExoPlayer/issues/1966)).
|
([#1966](https://github.com/google/ExoPlayer/issues/1966)).
|
||||||
* Misc bugfixes.
|
* Misc bugfixes.
|
||||||
|
|
||||||
### r1.5.12 ###
|
### r1.5.12 ###
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ allprojects {
|
||||||
releaseRepoName = 'exoplayer'
|
releaseRepoName = 'exoplayer'
|
||||||
releaseUserOrg = 'google'
|
releaseUserOrg = 'google'
|
||||||
releaseGroupId = 'com.google.android.exoplayer'
|
releaseGroupId = 'com.google.android.exoplayer'
|
||||||
releaseVersion = 'r2.1.0'
|
releaseVersion = 'r2.1.1'
|
||||||
releaseWebsite = 'https://github.com/google/ExoPlayer'
|
releaseWebsite = 'https://github.com/google/ExoPlayer'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.google.android.exoplayer2.demo"
|
package="com.google.android.exoplayer2.demo"
|
||||||
android:versionCode="2100"
|
android:versionCode="2101"
|
||||||
android:versionName="2.1.0">
|
android:versionName="2.1.1">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,12 @@ public abstract class BaseRenderer implements Renderer, RendererCapabilities {
|
||||||
return streamIsFinal ? C.RESULT_BUFFER_READ : C.RESULT_NOTHING_READ;
|
return streamIsFinal ? C.RESULT_BUFFER_READ : C.RESULT_NOTHING_READ;
|
||||||
}
|
}
|
||||||
buffer.timeUs += streamOffsetUs;
|
buffer.timeUs += streamOffsetUs;
|
||||||
|
} else if (result == C.RESULT_FORMAT_READ) {
|
||||||
|
Format format = formatHolder.format;
|
||||||
|
if (format.subsampleOffsetUs != Format.OFFSET_SAMPLE_RELATIVE) {
|
||||||
|
format = format.copyWithSubsampleOffsetUs(format.subsampleOffsetUs + streamOffsetUs);
|
||||||
|
formatHolder.format = format;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -676,6 +676,7 @@ import java.io.IOException;
|
||||||
standaloneMediaClock.stop();
|
standaloneMediaClock.stop();
|
||||||
rendererMediaClock = null;
|
rendererMediaClock = null;
|
||||||
rendererMediaClockSource = null;
|
rendererMediaClockSource = null;
|
||||||
|
rendererPositionUs = RENDERER_TIMESTAMP_OFFSET_US;
|
||||||
for (Renderer renderer : enabledRenderers) {
|
for (Renderer renderer : enabledRenderers) {
|
||||||
try {
|
try {
|
||||||
ensureStopped(renderer);
|
ensureStopped(renderer);
|
||||||
|
|
@ -823,9 +824,6 @@ import java.io.IOException;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean haveSufficientBuffer(boolean rebuffering) {
|
private boolean haveSufficientBuffer(boolean rebuffering) {
|
||||||
if (loadingPeriodHolder == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
long loadingPeriodBufferedPositionUs = !loadingPeriodHolder.prepared
|
long loadingPeriodBufferedPositionUs = !loadingPeriodHolder.prepared
|
||||||
? loadingPeriodHolder.startPositionUs
|
? loadingPeriodHolder.startPositionUs
|
||||||
: loadingPeriodHolder.mediaPeriod.getBufferedPositionUs();
|
: loadingPeriodHolder.mediaPeriod.getBufferedPositionUs();
|
||||||
|
|
@ -1287,7 +1285,8 @@ import java.io.IOException;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void maybeContinueLoading() {
|
private void maybeContinueLoading() {
|
||||||
long nextLoadPositionUs = loadingPeriodHolder.mediaPeriod.getNextLoadPositionUs();
|
long nextLoadPositionUs = !loadingPeriodHolder.prepared ? 0
|
||||||
|
: loadingPeriodHolder.mediaPeriod.getNextLoadPositionUs();
|
||||||
if (nextLoadPositionUs == C.TIME_END_OF_SOURCE) {
|
if (nextLoadPositionUs == C.TIME_END_OF_SOURCE) {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public interface ExoPlayerLibraryInfo {
|
||||||
/**
|
/**
|
||||||
* The version of the library, expressed as a string.
|
* The version of the library, expressed as a string.
|
||||||
*/
|
*/
|
||||||
String VERSION = "2.1.0";
|
String VERSION = "2.1.1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The version of the library, expressed as an integer.
|
* 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
|
* corresponding integer version 1002003 (001-002-003), and "123.45.6" has the corresponding
|
||||||
* integer version 123045006 (123-045-006).
|
* integer version 123045006 (123-045-006).
|
||||||
*/
|
*/
|
||||||
int VERSION_INT = 2001000;
|
int VERSION_INT = 2001001;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
|
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ import java.io.IOException;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getNextLoadPositionUs() {
|
public long getNextLoadPositionUs() {
|
||||||
return getBufferedPositionUs();
|
return enabledTrackCount == 0 ? C.TIME_END_OF_SOURCE : getBufferedPositionUs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -133,4 +133,32 @@ public interface MediaPeriod extends SequenceableLoader {
|
||||||
*/
|
*/
|
||||||
long seekToUs(long positionUs);
|
long seekToUs(long positionUs);
|
||||||
|
|
||||||
|
// SequenceableLoader interface. Overridden to provide more specific documentation.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the next load time, or {@link C#TIME_END_OF_SOURCE} if loading has finished.
|
||||||
|
* <p>
|
||||||
|
* This method should only be called after the period has been prepared. It may be called when no
|
||||||
|
* tracks are selected.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
long getNextLoadPositionUs();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to continue loading.
|
||||||
|
* <p>
|
||||||
|
* This method may be called both during and after the period has been prepared.
|
||||||
|
* <p>
|
||||||
|
* A period may call {@link Callback#onContinueLoadingRequested(SequenceableLoader)} on the
|
||||||
|
* {@link Callback} passed to {@link #prepare(Callback)} to request that this method be called
|
||||||
|
* when the period is permitted to continue loading data. A period may do this both during and
|
||||||
|
* after preparation.
|
||||||
|
*
|
||||||
|
* @param positionUs The current playback position.
|
||||||
|
* @return True if progress was made, meaning that {@link #getNextLoadPositionUs()} will return
|
||||||
|
* a different value than prior to the call. False otherwise.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
boolean continueLoading(long positionUs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,15 +104,14 @@ public final class HlsMediaSource implements MediaSource,
|
||||||
SinglePeriodTimeline timeline;
|
SinglePeriodTimeline timeline;
|
||||||
if (playlistTracker.isLive()) {
|
if (playlistTracker.isLive()) {
|
||||||
// TODO: fix windowPositionInPeriodUs when playlist is empty.
|
// TODO: fix windowPositionInPeriodUs when playlist is empty.
|
||||||
long windowPositionInPeriodUs = playlist.startTimeUs;
|
|
||||||
List<HlsMediaPlaylist.Segment> segments = playlist.segments;
|
List<HlsMediaPlaylist.Segment> segments = playlist.segments;
|
||||||
long windowDefaultStartPositionUs = segments.isEmpty() ? 0
|
long windowDefaultStartPositionUs = segments.isEmpty() ? 0
|
||||||
: segments.get(Math.max(0, segments.size() - 3)).relativeStartTimeUs;
|
: segments.get(Math.max(0, segments.size() - 3)).relativeStartTimeUs;
|
||||||
timeline = new SinglePeriodTimeline(C.TIME_UNSET, playlist.durationUs,
|
timeline = new SinglePeriodTimeline(C.TIME_UNSET, playlist.durationUs,
|
||||||
windowPositionInPeriodUs, windowDefaultStartPositionUs, true, !playlist.hasEndTag);
|
playlist.startTimeUs, windowDefaultStartPositionUs, true, !playlist.hasEndTag);
|
||||||
} else /* not live */ {
|
} else /* not live */ {
|
||||||
timeline = new SinglePeriodTimeline(playlist.durationUs, playlist.durationUs, 0, 0, true,
|
timeline = new SinglePeriodTimeline(playlist.startTimeUs + playlist.durationUs,
|
||||||
false);
|
playlist.durationUs, playlist.startTimeUs, 0, true, false);
|
||||||
}
|
}
|
||||||
sourceListener.onSourceInfoRefreshed(timeline, playlist);
|
sourceListener.onSourceInfoRefreshed(timeline, playlist);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue