Skip to content

Commit

Permalink
Merge pull request #336 from androidx/release-1.0.1-stable
Browse files Browse the repository at this point in the history
1.0.1
  • Loading branch information
rohitjoins authored Apr 19, 2023
2 parents 2ca9050 + 4f0b30b commit 3c01488
Show file tree
Hide file tree
Showing 77 changed files with 1,994 additions and 517 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ body:
label: Media3 Version
description: What version of Media3 (or ExoPlayer) are you using?
options:
- Media3 1.0.1
- Media3 1.0.0
- Media3 1.0.0-rc02
- Media3 1.0.0-rc01
Expand All @@ -29,6 +30,7 @@ body:
- Media3 1.0.0-alpha03
- Media3 1.0.0-alpha02
- Media3 1.0.0-alpha01
- ExoPlayer 2.18.6
- ExoPlayer 2.18.5
- ExoPlayer 2.18.4
- ExoPlayer 2.18.3
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In case your question is related to a piece of media:
- Authentication HTTP headers

Don't forget to check ExoPlayer's supported formats and devices, if applicable
(https://exoplayer.dev/supported-formats.html).
(https://developer.android.com/guide/topics/media/exoplayer/supported-formats).

If there's something you don't want to post publicly, please submit the issue,
then email the link/bug report to dev.exoplayer@gmail.com using a subject in the
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ We will also consider high quality pull requests. These should merge
into the `main` branch. Before a pull request can be accepted you must submit
a Contributor License Agreement, as described below.

### Code style

We follow the
[Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
and use [`google-java-format`](https://github.com/google/google-java-format) to
automatically reformat the code. Please consider auto-formatting your changes
before opening a PR (we will otherwise do this ourselves before merging). You
can use the various IDE integrations available, or bulk-reformat all the changes
you made on top of `main` using
[`google-java-format-diff.py`](https://github.com/google/google-java-format/blob/master/scripts/google-java-format-diff.py):

```shell
$ git diff -U0 main... | google-java-format-diff.py -p1 -i
```

## Contributor license agreement

Contributions to any Google project must be accompanied by a Contributor
Expand Down
39 changes: 39 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Release notes

### 1.0.1 (2023-04-18)

This release corresponds to the
[ExoPlayer 2.18.6 release](https://github.com/google/ExoPlayer/releases/tag/r2.18.6).

* Core library:
* Reset target live stream override when seeking to default position
([#11051](https://github.com/google/ExoPlayer/pull/11051)).
* Fix bug where empty sample streams in the media could cause playback to
be stuck.
* Session:
* Fix bug where multiple identical queue items published by a legacy
`MediaSessionCompat` result in an exception in `MediaController`
([#290](https://github.com/androidx/media/issues/290)).
* Add missing forwarding of `MediaSession.broadcastCustomCommand` to the
legacy `MediaControllerCompat.Callback.onSessionEvent`
([#293](https://github.com/androidx/media/issues/293)).
* Fix bug where calling `MediaSession.setPlayer` doesn't update the
available commands.
* Fix issue that `TrackSelectionOverride` instances sent from a
`MediaController` are ignored if they reference a group with
`Format.metadata`
([#296](https://github.com/androidx/media/issues/296)).
* Fix issue where `Player.COMMAND_GET_CURRENT_MEDIA_ITEM` needs to be
available to access metadata via the legacy `MediaSessionCompat`.
* Fix issue where `MediaSession` instances on a background thread cause
crashes when used in `MediaSessionService`
([#318](https://github.com/androidx/media/issues/318)).
* Fix issue where a media button receiver was declared by the library
without the app having intended this
([#314](https://github.com/androidx/media/issues/314)).
* DASH:
* Fix handling of empty segment timelines
([#11014](https://github.com/google/ExoPlayer/issues/11014)).
* RTSP:
* Retry with TCP if RTSP Setup with UDP fails with RTSP Error 461
UnsupportedTransport
([#11069](https://github.com/google/ExoPlayer/issues/11069)).

### 1.0.0 (2023-03-22)

This release corresponds to the
Expand Down
4 changes: 2 additions & 2 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
project.ext {
releaseVersion = '1.0.0'
releaseVersionCode = 1_000_000_3_00
releaseVersion = '1.0.1'
releaseVersionCode = 1_000_001_3_00
minSdkVersion = 16
appTargetSdkVersion = 33
// API version before restricting local file access.
Expand Down
1 change: 1 addition & 0 deletions demos/gl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ android {
versionCode project.ext.releaseVersionCode
minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.appTargetSdkVersion
multiDexEnabled true
}

buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion demos/main/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<string name="unexpected_intent_action">Unexpected intent action: <xliff:g id="action">%1$s</xliff:g></string>

<string name="error_cleartext_not_permitted">Cleartext HTTP traffic not permitted. See https://exoplayer.dev/issues/cleartext-not-permitted</string>
<string name="error_cleartext_not_permitted">Cleartext HTTP traffic not permitted. See https://developer.android.com/guide/topics/media/issues/cleartext-not-permitted</string>

<string name="error_generic">Playback failed</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import android.view.ViewGroup
import android.widget.ArrayAdapter
import android.widget.ListView
import android.widget.TextView
import androidx.activity.OnBackPressedCallback
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.media3.common.MediaItem
Expand Down Expand Up @@ -73,20 +74,24 @@ class MainActivity : AppCompatActivity() {
val intent = Intent(this, PlayerActivity::class.java)
startActivity(intent)
}

onBackPressedDispatcher.addCallback(
object : OnBackPressedCallback(/* enabled= */ true) {
override fun handleOnBackPressed() {
popPathStack()
}
}
)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) {
onBackPressed()
onBackPressedDispatcher.onBackPressed()
return true
}
return super.onOptionsItemSelected(item)
}

override fun onBackPressed() {
popPathStack()
}

override fun onStart() {
super.onStart()
initializeBrowser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class PlayerActivity : AppCompatActivity() {
updateMediaMetadataUI(controller.mediaMetadata)
updateShuffleSwitchUI(controller.shuffleModeEnabled)
updateRepeatSwitchUI(controller.repeatMode)
playerView.setShowSubtitleButton(controller.currentTracks.isTypeSupported(TRACK_TYPE_TEXT))

controller.addListener(
object : Player.Listener {
Expand Down
2 changes: 1 addition & 1 deletion demos/transformer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ manual steps.
(this will only appear if the AAR is present), then build and run the demo
app and select a MediaPipe-based effect.
[Transformer]: https://exoplayer.dev/transforming-media.html
[Transformer]: https://developer.android.com/guide/topics/media/transforming-media
[MediaPipe]: https://google.github.io/mediapipe/
[build an AAR]: https://google.github.io/mediapipe/getting_started/android_archive_library.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
/* package */ final class MatrixTransformationFactory {
/**
* Returns a {@link MatrixTransformation} that rescales the frames over the first {@value
* Returns a {@link MatrixTransformation} that rescales the frames over the first {@link
* #ZOOM_DURATION_SECONDS} seconds, such that the rectangle filled with the input frame increases
* linearly in size from a single point to filling the full output frame.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public final class AuxEffectInfo {
* Creates an instance with the given effect identifier and send level.
*
* @param effectId The effect identifier. This is the value returned by {@link
* AudioEffect#getId()} on the effect, or {@value #NO_AUX_EFFECT_ID} which represents no
* AudioEffect#getId()} on the effect, or {@link #NO_AUX_EFFECT_ID} which represents no
* effect. This value is passed to {@link AudioTrack#attachAuxEffect(int)} on the underlying
* audio track.
* @param sendLevel The send level for the effect, where 0 represents no effect and a value of 1
* is full send. If {@code effectId} is not {@value #NO_AUX_EFFECT_ID}, this value is passed
* to {@link AudioTrack#setAuxEffectSendLevel(float)} on the underlying audio track.
* is full send. If {@code effectId} is not {@link #NO_AUX_EFFECT_ID}, this value is passed to
* {@link AudioTrack#setAuxEffectSendLevel(float)} on the underlying audio track.
*/
public AuxEffectInfo(int effectId, float sendLevel) {
this.effectId = effectId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
*
* <p>When building formats, populate all fields whose values are known and relevant to the type of
* format being constructed. For information about different types of format, see ExoPlayer's <a
* href="https://exoplayer.dev/supported-formats.html">Supported formats page</a>.
* href="https://developer.android.com/guide/topics/media/exoplayer/supported-formats">Supported
* formats page</a>.
*
* <h2>Fields commonly relevant to all formats</h2>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.TextureView;
import androidx.annotation.CallSuper;
import androidx.annotation.Nullable;
import androidx.media3.common.text.Cue;
import androidx.media3.common.text.CueGroup;
Expand Down Expand Up @@ -47,14 +48,29 @@ public Looper getApplicationLooper() {
return player.getApplicationLooper();
}

/** Calls {@link Player#addListener(Listener)} on the delegate. */
/**
* Calls {@link Player#addListener(Listener)} on the delegate.
*
* <p>Overrides of this method must delegate to {@code super.addListener} and not {@code
* delegate.addListener}, in order to ensure the correct {@link Player} instance is passed to
* {@link Player.Listener#onEvents(Player, Events)} (i.e. this forwarding instance, and not the
* underlying {@code delegate} instance).
*/
@Override
@CallSuper
public void addListener(Listener listener) {
player.addListener(new ForwardingListener(this, listener));
}

/** Calls {@link Player#removeListener(Listener)} on the delegate. */
/**
* Calls {@link Player#removeListener(Listener)} on the delegate.
*
* <p>Overrides of this method must delegate to {@code super.removeListener} and not {@code
* delegate.removeListener}, in order to ensure the listener 'matches' the listener added via
* {@link #addListener} (otherwise the listener registered on the delegate won't be removed).
*/
@Override
@CallSuper
public void removeListener(Listener listener) {
player.removeListener(new ForwardingListener(this, listener));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public final class MediaLibraryInfo {

/** The version of the library expressed as a string, for example "1.2.3" or "1.2.3-beta01". */
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION_INT) or vice versa.
public static final String VERSION = "1.0.0";
public static final String VERSION = "1.0.1";

/** The version of the library expressed as {@code TAG + "/" + VERSION}. */
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
public static final String VERSION_SLASHY = "AndroidXMedia3/1.0.0";
public static final String VERSION_SLASHY = "AndroidXMedia3/1.0.1";

/**
* The version of the library expressed as an integer, for example 1002003300.
Expand All @@ -47,7 +47,7 @@ public final class MediaLibraryInfo {
* (123-045-006-3-00).
*/
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
public static final int VERSION_INT = 1_000_000_3_00;
public static final int VERSION_INT = 1_000_001_3_00;

/** Whether the library was compiled with {@link Assertions} checks enabled. */
public static final boolean ASSERTIONS_ENABLED = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ public class PlaybackException extends Exception implements Bundleable {
* Caused by the player trying to access cleartext HTTP traffic (meaning http:// rather than
* https://) when the app's Network Security Configuration does not permit it.
*
* <p>See <a href="https://exoplayer.dev/issues/cleartext-not-permitted">this corresponding
* troubleshooting topic</a>.
* <p>See <a
* href="https://developer.android.com/guide/topics/media/issues/cleartext-not-permitted">this
* corresponding troubleshooting topic</a>.
*/
public static final int ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED = 2007;
/** Caused by reading data out of the data bound. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3355,7 +3355,8 @@ private void verifyApplicationThreadAndInitState() {
"Player is accessed on the wrong thread.\n"
+ "Current thread: '%s'\n"
+ "Expected thread: '%s'\n"
+ "See https://exoplayer.dev/issues/player-accessed-on-wrong-thread",
+ "See https://developer.android.com/guide/topics/media/issues/"
+ "player-accessed-on-wrong-thread",
Thread.currentThread().getName(), applicationLooper.getThread().getName());
throw new IllegalStateException(message);
}
Expand Down
37 changes: 23 additions & 14 deletions libraries/common/src/main/java/androidx/media3/common/Timeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@
*
* <h2 id="single-file">Single media file or on-demand stream</h2>
*
* <p style="align:center"><img src="doc-files/timeline-single-file.svg" alt="Example timeline for a
* single file">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-single-file.svg"
* alt="Example timeline for a single file">
*
* <p>A timeline for a single media file or on-demand stream consists of a single period and window.
* The window spans the whole period, indicating that all parts of the media are available for
Expand All @@ -71,8 +72,9 @@
*
* <h2>Playlist of media files or on-demand streams</h2>
*
* <p style="align:center"><img src="doc-files/timeline-playlist.svg" alt="Example timeline for a
* playlist of files">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-playlist.svg"
* alt="Example timeline for a playlist of files">
*
* <p>A timeline for a playlist of media files or on-demand streams consists of multiple periods,
* each with its own window. Each window spans the whole of the corresponding period, and typically
Expand All @@ -82,8 +84,9 @@
*
* <h2 id="live-limited">Live stream with limited availability</h2>
*
* <p style="align:center"><img src="doc-files/timeline-live-limited.svg" alt="Example timeline for
* a live stream with limited availability">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-live-limited.svg"
* alt="Example timeline for a live stream with limited availability">
*
* <p>A timeline for a live stream consists of a period whose duration is unknown, since it's
* continually extending as more content is broadcast. If content only remains available for a
Expand All @@ -95,8 +98,9 @@
*
* <h2>Live stream with indefinite availability</h2>
*
* <p style="align:center"><img src="doc-files/timeline-live-indefinite.svg" alt="Example timeline
* for a live stream with indefinite availability">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-live-indefinite.svg"
* alt="Example timeline for a live stream with indefinite availability">
*
* <p>A timeline for a live stream with indefinite availability is similar to the <a
* href="#live-limited">Live stream with limited availability</a> case, except that the window
Expand All @@ -105,8 +109,9 @@
*
* <h2 id="live-multi-period">Live stream with multiple periods</h2>
*
* <p style="align:center"><img src="doc-files/timeline-live-multi-period.svg" alt="Example timeline
* for a live stream with multiple periods">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-live-multi-period.svg"
* alt="Example timeline for a live stream with multiple periods">
*
* <p>This case arises when a live stream is explicitly divided into separate periods, for example
* at content boundaries. This case is similar to the <a href="#live-limited">Live stream with
Expand All @@ -115,8 +120,9 @@
*
* <h2>On-demand stream followed by live stream</h2>
*
* <p style="align:center"><img src="doc-files/timeline-advanced.svg" alt="Example timeline for an
* on-demand stream followed by a live stream">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-advanced.svg"
* alt="Example timeline for an on-demand stream followed by a live stream">
*
* <p>This case is the concatenation of the <a href="#single-file">Single media file or on-demand
* stream</a> and <a href="#multi-period">Live stream with multiple periods</a> cases. When playback
Expand All @@ -125,12 +131,15 @@
*
* <h2 id="single-file-midrolls">On-demand stream with mid-roll ads</h2>
*
* <p style="align:center"><img src="doc-files/timeline-single-file-midrolls.svg" alt="Example
* timeline for an on-demand stream with mid-roll ad groups">
* <p style="align:center"><img
* src="https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/doc-files/timeline-single-file-midrolls.svg"
* alt="Example timeline for an on-demand stream with mid-roll ad groups">
*
* <p>This case includes mid-roll ad groups, which are defined as part of the timeline's single
* period. The period can be queried for information about the ad groups and the ads they contain.
*/
// TODO(b/276289331): Revert to media3-hosted SVG links above once they're available on
// developer.android.com.
public abstract class Timeline implements Bundleable {

/**
Expand Down
Loading

0 comments on commit 3c01488

Please sign in to comment.