语言

Menu
Sites
Language
Stop player music when I receive a call

Hi,

I need your help, I would like stop my player when I receive a call or when I make a movie.
Do you know how I can do that? 
Thank you

响应

3 回复
hgw7

The Tizen::Media::IPlayerEventListener Interface contains the callback virtual void OnPlayerInterrupted(void) that should get invoked when higher priority process like an incoming call arises. You can stop or pause your player class' instance in this method.

Benoit JOUANIGO

Thank you for your help but I already use this interface and when I receive a call, the OnPlayerInterrupted isn't call.

Another way is by using OnBackground method in main class but this will stop the player when the screen goes off (put screen always on for the app)

Get Current frame, then get current form then call public method PuaseMovie (player->pause())