media notification
This commit is contained in:
parent
e1fb5e02a0
commit
fbd70ca875
1 changed files with 1 additions and 0 deletions
|
@ -139,6 +139,7 @@ public class VideoPlayer extends AppCompatActivity {
|
||||||
// Prepare the player.
|
// Prepare the player.
|
||||||
player.setPlayWhenReady(true);
|
player.setPlayWhenReady(true);
|
||||||
playerNotificationManager = new PlayerNotificationManager.Builder(this, notificationId, "playback").build();
|
playerNotificationManager = new PlayerNotificationManager.Builder(this, notificationId, "playback").build();
|
||||||
|
playerNotificationManager.setMediaSessionToken(mediaSession.getSessionToken());
|
||||||
playerNotificationManager.setPlayer(player);
|
playerNotificationManager.setPlayer(player);
|
||||||
player.setMediaSource(mediaSource);
|
player.setMediaSource(mediaSource);
|
||||||
player.prepare();
|
player.prepare();
|
||||||
|
|
Loading…
Reference in a new issue