equal
deleted
inserted
replaced
41 // C++ default constructor can NOT contain any code, that |
41 // C++ default constructor can NOT contain any code, that |
42 // might leave. |
42 // might leave. |
43 // ----------------------------------------------------------------------------- |
43 // ----------------------------------------------------------------------------- |
44 CBavpPlugin::CBavpPlugin() |
44 CBavpPlugin::CBavpPlugin() |
45 : iError( EFalse ), |
45 : iError( EFalse ), |
46 iMimeType( NULL ) |
46 iMimeType( NULL ), |
|
47 iPauseState ( EFalse ) |
47 { |
48 { |
48 |
49 |
49 } |
50 } |
50 |
51 |
51 // ----------------------------------------------------------------------------- |
52 // ----------------------------------------------------------------------------- |
342 { |
343 { |
343 // If Browser out-focus, we send this plugin aParam=EFalse. |
344 // If Browser out-focus, we send this plugin aParam=EFalse. |
344 // If Browser in-focus, we send this plugin aParam=ETrue, if |
345 // If Browser in-focus, we send this plugin aParam=ETrue, if |
345 // the plugin is (was) in-focus or activated. |
346 // the plugin is (was) in-focus or activated. |
346 iBavpController->HandleBrowserNotification( TBool(aParam) ); |
347 iBavpController->HandleBrowserNotification( TBool(aParam) ); |
|
348 if(!aParam) //app background |
|
349 { |
|
350 if(EBavpPlaying == iBavpController->State()) |
|
351 { |
|
352 iPauseState = ETrue; |
|
353 iBavpController->PauseL(); |
|
354 } |
|
355 } |
|
356 else //app foreground |
|
357 { |
|
358 if(EBavpPaused == iBavpController->State() && iPauseState) |
|
359 { |
|
360 iPauseState = EFalse; |
|
361 iBavpController->PlayL(); |
|
362 } |
|
363 |
|
364 } |
|
365 |
347 } |
366 } |
348 break; |
367 break; |
349 |
368 |
|
369 case EPluginPause : |
|
370 if( !aParam ) |
|
371 { |
|
372 if(iBavpController && iPauseState && (iBavpController->State() == EBavpPaused)) |
|
373 { |
|
374 iPauseState = EFalse; |
|
375 iBavpController->PlayL(); |
|
376 } |
|
377 } |
|
378 |
|
379 break; |
|
380 case EPluginInvisible : |
|
381 if( !aParam ) |
|
382 { |
|
383 if ( iBavpController && (!iPauseState) ) //plugin background |
|
384 { |
|
385 if(EBavpPlaying == iBavpController->State()) |
|
386 { |
|
387 iPauseState = ETrue; |
|
388 iBavpController->PauseL(); |
|
389 } |
|
390 } |
|
391 } |
|
392 break; |
350 default: |
393 default: |
351 // Not implemented |
394 // Not implemented |
352 break; |
395 break; |
353 |
396 |
354 }; // end of switch |
397 }; // end of switch |