siddhesh-tamhanekar / media_player

An flutter media player to make media streaming apps effortlessly! read getting started tutorial on https://medium.com/@tamhanekar.siddhesh95/integrate-media-player-into-your-flutter-application-23040213f0c9
MIT License
46 stars 22 forks source link

how to remove media notification on notification panel #2

Closed Wizpna closed 5 years ago

Wizpna commented 5 years ago

Please, I want to remove media notification from my notification panel but it does not work unless I restart my phone then the media notification will be removed.

Can you add something like a close button, so that when a user clicks on the button the media player will close and disappear from the notification panel.

hulastone commented 5 years ago

@Wizpna : maybe help you. this below code to start player. if you want to hide notification, You set property "showNotification = false". I haven't tested yet, only thinking ^_^

void initState() { // first argument for isBackground next for showNotification. player = MediaPlayerPlugin.create(isBackground: true, showNotification: true); initVideo(); super.initState(); }

siddhesh-tamhanekar commented 5 years ago

@hulastone it's not like that showNotificaition is the setting which toggles the visibility of the Persistent player notification.

The @Wizpna is asking about the feature for a closing player from the notification panel.

@Wizpna You don't have to restart the phone when an app is closed the notification automatically get closed.

The feature is in line and it will available soon. Thanks for your vote for the feature.

siddhesh-tamhanekar commented 5 years ago

@Wizpna The bug of the not closing media player on some devices has been fixed in version 0.0.6 so closing this request yes. there could be a close button to close the player manually when the user wants to but it's another enhancement rather than a bug.