photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp
equal
deleted
inserted
replaced
89 // |
89 // |
90 void CGlxCommandHandlerVideoPlayback::ConstructL() |
90 void CGlxCommandHandlerVideoPlayback::ConstructL() |
91 { |
91 { |
92 iUiUtility = CGlxUiUtility::UtilityL(); |
92 iUiUtility = CGlxUiUtility::UtilityL(); |
93 |
93 |
94 const TUid playbackMode = { 0x200009EE }; // photos UID |
|
95 iPlaybackUtility = MMPXPlaybackUtility::UtilityL( playbackMode ); |
|
96 MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager(); |
|
97 manager.SelectPlayerL( KVideoHelixPlaybackPluginUid ); |
|
98 iPlaybackUtility->AddObserverL( *this ); |
|
99 |
94 |
100 iViewUtility = MMPXViewUtility::UtilityL(); |
95 iViewUtility = MMPXViewUtility::UtilityL(); |
101 |
96 |
102 // Add supported commands |
97 // Add supported commands |
103 |
98 |
213 const CGlxMedia* media = item.Properties(); |
208 const CGlxMedia* media = item.Properties(); |
214 if(media) |
209 if(media) |
215 { |
210 { |
216 if(media->IsSupported(KMPXMediaGeneralUri)) |
211 if(media->IsSupported(KMPXMediaGeneralUri)) |
217 { |
212 { |
|
213 if (!iPlaybackUtility) |
|
214 { |
|
215 GLX_LOG_INFO( "CmdHandler VideoPlayback - SelectPlayerL(+)" ); |
|
216 const TUid playbackMode = { 0x200009EE }; // photos UID |
|
217 iPlaybackUtility = MMPXPlaybackUtility::UtilityL( playbackMode ); |
|
218 MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager(); |
|
219 manager.SelectPlayerL( KVideoHelixPlaybackPluginUid ); |
|
220 iPlaybackUtility->AddObserverL( *this ); |
|
221 GLX_LOG_INFO( "CmdHandler VideoPlayback - SelectPlayerL(-)" ); |
|
222 } |
218 // MPX playbackutility instead of VIA Player |
223 // MPX playbackutility instead of VIA Player |
219 const TDesC& filename = media->ValueText(KMPXMediaGeneralUri); |
224 const TDesC& filename = media->ValueText(KMPXMediaGeneralUri); |
220 // Causes callback to HandlePlaybackMessage() |
225 // Causes callback to HandlePlaybackMessage() |
221 iPlaybackUtility->InitL(filename); |
226 iPlaybackUtility->InitL(filename); |
222 } |
227 } |