Commit afd11de5 by bachinger Committed by Oliver Woodman

add a PlayerNotificationManager to post media style notifications.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188352116
parent a526d3fa
Showing with 48 additions and 0 deletions
......@@ -43,6 +43,9 @@ cmake-build-debug
dist
tmp
# External native builds
.externalNativeBuild
# VP9 extension
extensions/vp9/src/main/jni/libvpx
extensions/vp9/src/main/jni/libvpx_android_configs
......@@ -62,3 +65,4 @@ extensions/cronet/jniLibs/*
!extensions/cronet/jniLibs/README.md
extensions/cronet/libs/*
!extensions/cronet/libs/README.md
......@@ -35,6 +35,7 @@
header ([#3926](https://github.com/google/ExoPlayer/issues/3926)).
* Video: force rendering a frame periodically in `MediaCodecVideoRenderer` and
`LibvpxVideoRenderer`, even if it is late.
* Add PlayerNotificationManager.
### 2.7.0 ###
......
......@@ -64,4 +64,12 @@ public interface ControlDispatcher {
*/
boolean dispatchSetShuffleModeEnabled(Player player, boolean shuffleModeEnabled);
/**
* Dispatches a {@link Player#stop()} operation.
*
* @param player The {@link Player} to which the operation should be dispatched.
* @param reset Whether the player should be reset.
* @return True if the operation was dispatched. False if suppressed.
*/
boolean dispatchStop(Player player, boolean reset);
}
......@@ -47,4 +47,9 @@ public class DefaultControlDispatcher implements ControlDispatcher {
return true;
}
@Override
public boolean dispatchStop(Player player, boolean reset) {
player.stop(reset);
return true;
}
}
......@@ -34,6 +34,7 @@ android {
dependencies {
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-media-compat:' + supportLibraryVersion
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
}
......
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M0 0h24v24H0z" />
<path
android:fillColor="#000000"
android:pathData="M6 6h12v12H6z" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="exo_controls_play">@drawable/exo_icon_play</drawable>
<drawable name="exo_controls_pause">@drawable/exo_icon_pause</drawable>
<drawable name="exo_controls_next">@drawable/exo_icon_next</drawable>
<drawable name="exo_controls_previous">@drawable/exo_icon_previous</drawable>
<drawable name="exo_controls_fastforward">@drawable/exo_icon_fastforward</drawable>
<drawable name="exo_controls_rewind">@drawable/exo_icon_rewind</drawable>
<drawable name="exo_notification_play">@drawable/exo_icon_play</drawable>
<drawable name="exo_notification_pause">@drawable/exo_icon_pause</drawable>
<drawable name="exo_notification_next">@drawable/exo_icon_next</drawable>
<drawable name="exo_notification_previous">@drawable/exo_icon_previous</drawable>
<drawable name="exo_notification_fastforward">@drawable/exo_icon_fastforward</drawable>
<drawable name="exo_notification_rewind">@drawable/exo_icon_rewind</drawable>
<drawable name="exo_notification_stop">@drawable/exo_icon_stop</drawable>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment