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.
|
||||
player.setPlayWhenReady(true);
|
||||
playerNotificationManager = new PlayerNotificationManager.Builder(this, notificationId, "playback").build();
|
||||
playerNotificationManager.setMediaSessionToken(mediaSession.getSessionToken());
|
||||
playerNotificationManager.setPlayer(player);
|
||||
player.setMediaSource(mediaSource);
|
||||
player.prepare();
|
||||
|
|
Loading…
Reference in a new issue