equal
deleted
inserted
replaced
44 CBavpPlugin::CBavpPlugin() |
44 CBavpPlugin::CBavpPlugin() |
45 : iError( EFalse ), |
45 : iError( EFalse ), |
46 iMimeType( NULL ), |
46 iMimeType( NULL ), |
47 iPauseState ( EFalse ), |
47 iPauseState ( EFalse ), |
48 iIsForeGround ( ETrue ), |
48 iIsForeGround ( ETrue ), |
49 iPauseInBackground (EFalse) |
49 iPauseInBackground (EFalse), |
|
50 iPlayFromFile(EFalse) |
50 { |
51 { |
51 |
52 |
52 } |
53 } |
53 |
54 |
54 // ----------------------------------------------------------------------------- |
55 // ----------------------------------------------------------------------------- |
186 // CBavpPlugin::OpenAndPlayFileL |
187 // CBavpPlugin::OpenAndPlayFileL |
187 // Called by Browser when ready for file to be played |
188 // Called by Browser when ready for file to be played |
188 // ----------------------------------------------------------------------------- |
189 // ----------------------------------------------------------------------------- |
189 void CBavpPlugin::OpenAndPlayFileL( const TDesC& aFilename, const HBufC* originalFileName ) |
190 void CBavpPlugin::OpenAndPlayFileL( const TDesC& aFilename, const HBufC* originalFileName ) |
190 { |
191 { |
|
192 iPlayFromFile = ETrue; |
191 Log( EFalse, _L("CBavpPlugin::OpenAndPlayFileL"), (TInt)this ); |
193 Log( EFalse, _L("CBavpPlugin::OpenAndPlayFileL"), (TInt)this ); |
192 |
194 |
193 if ( !iBavpView ) |
195 if ( !iBavpView ) |
194 { |
196 { |
195 // The view is not set yet. |
197 // The view is not set yet. |
259 // CBavpPlugin::OpenAndPlayUrlL |
261 // CBavpPlugin::OpenAndPlayUrlL |
260 // Called by Browser when ready for url to be played |
262 // Called by Browser when ready for url to be played |
261 // ----------------------------------------------------------------------------- |
263 // ----------------------------------------------------------------------------- |
262 void CBavpPlugin::OpenAndPlayUrlL( const TDesC& aUrl ) |
264 void CBavpPlugin::OpenAndPlayUrlL( const TDesC& aUrl ) |
263 { |
265 { |
|
266 iPlayFromFile = EFalse; |
264 Log( EFalse, _L("CBavpPlugin::OpenAndPlayUrlL"), (TInt)this ); |
267 Log( EFalse, _L("CBavpPlugin::OpenAndPlayUrlL"), (TInt)this ); |
265 |
268 |
266 if ( iBavpController ) |
269 if ( iBavpController ) |
267 { |
270 { |
268 // Will stop current audio or video player |
271 // Will stop current audio or video player |
413 { |
416 { |
414 iPauseState = EFalse; |
417 iPauseState = EFalse; |
415 iBavpController->PlayL(); |
418 iBavpController->PlayL(); |
416 } |
419 } |
417 break; |
420 break; |
|
421 case EAccesPointChanged : |
|
422 if (iBavpController && !iPlayFromFile) { |
|
423 bool state = (iBavpController->State() == EBavpPaused || |
|
424 iBavpController->State() == EBavpPlaying || |
|
425 iBavpController->State() == EBavpBuffering || |
|
426 iBavpController->State() == EBavpFastForwarding || |
|
427 iBavpController->State() == EBavpRewinding ); |
|
428 iBavpController->Stop(); |
|
429 if (state) |
|
430 iBavpController->PlayL(); |
|
431 } |
|
432 break; |
|
433 |
418 default: |
434 default: |
419 // Not implemented |
435 // Not implemented |
420 break; |
436 break; |
421 |
437 |
422 }; // end of switch |
438 }; // end of switch |