media notification

This commit is contained in:
Page Asgardius 2022-10-10 13:31:49 -07:00
parent e1fb5e02a0
commit fbd70ca875

View file

@ -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();