photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp
changeset 2 7d9067c6fcb1
parent 0 4e91876724a2
child 18 bcb43dc84c44
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp	Thu Jan 07 12:46:23 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp	Mon Jan 18 20:19:20 2010 +0200
@@ -91,11 +91,6 @@
     {
     iUiUtility = CGlxUiUtility::UtilityL();
     
-    const TUid playbackMode = { 0x200009EE };  // photos UID
-    iPlaybackUtility = MMPXPlaybackUtility::UtilityL( playbackMode );
-    MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager();
-    manager.SelectPlayerL( KVideoHelixPlaybackPluginUid );
-    iPlaybackUtility->AddObserverL( *this ); 
      
     iViewUtility = MMPXViewUtility::UtilityL(); 
 
@@ -215,6 +210,16 @@
 		{
         if(media->IsSupported(KMPXMediaGeneralUri))
             {
+            if (!iPlaybackUtility)
+                {
+                GLX_LOG_INFO( "CmdHandler VideoPlayback - SelectPlayerL(+)" );
+                const TUid playbackMode = { 0x200009EE };  // photos UID
+                iPlaybackUtility = MMPXPlaybackUtility::UtilityL( playbackMode );
+                MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager();
+                manager.SelectPlayerL( KVideoHelixPlaybackPluginUid );
+                iPlaybackUtility->AddObserverL( *this ); 
+                GLX_LOG_INFO( "CmdHandler VideoPlayback - SelectPlayerL(-)" );
+                }
             // MPX playbackutility instead of VIA Player 
             const TDesC& filename = media->ValueText(KMPXMediaGeneralUri); 
             // Causes callback to HandlePlaybackMessage()