diff -r d6c1cc3e4806 -r dbd79466b1ed browserplugins/browseraudiovideoplugin/src/BavpPlugin.cpp --- a/browserplugins/browseraudiovideoplugin/src/BavpPlugin.cpp Fri Feb 19 22:53:19 2010 +0200 +++ b/browserplugins/browseraudiovideoplugin/src/BavpPlugin.cpp Fri Mar 12 15:43:05 2010 +0200 @@ -43,7 +43,8 @@ // ----------------------------------------------------------------------------- CBavpPlugin::CBavpPlugin() : iError( EFalse ), - iMimeType( NULL ) + iMimeType( NULL ), + iPauseState ( EFalse ) { } @@ -344,9 +345,51 @@ // If Browser in-focus, we send this plugin aParam=ETrue, if // the plugin is (was) in-focus or activated. iBavpController->HandleBrowserNotification( TBool(aParam) ); + if(!aParam) //app background + { + if(EBavpPlaying == iBavpController->State()) + { + iPauseState = ETrue; + iBavpController->PauseL(); + } + } + else //app foreground + { + if(EBavpPaused == iBavpController->State() && iPauseState) + { + iPauseState = EFalse; + iBavpController->PlayL(); + } + + } + } break; + case EPluginPause : + if( !aParam ) + { + if(iBavpController && iPauseState && (iBavpController->State() == EBavpPaused)) + { + iPauseState = EFalse; + iBavpController->PlayL(); + } + } + + break; + case EPluginInvisible : + if( !aParam ) + { + if ( iBavpController && (!iPauseState) ) //plugin background + { + if(EBavpPlaying == iBavpController->State()) + { + iPauseState = ETrue; + iBavpController->PauseL(); + } + } + } + break; default: // Not implemented break;