in my application,i just wanna open a url contain media,e.g. http://www.test.com/test.mp3,or rstp://www.test.com/test.3gp,so i 开发者_如何转开发need the symbian embeded media player's uid to open it.
This is what I use for showing links:
_LIT( KTestUrlPrefix,"4 " );
HBufC* parameter = HBufC::NewLC( KTestUrlPrefix().Length() + aLink.Length() );
parameter->Des().Copy( KTestUrlPrefix );
parameter->Des().Append( aLink );
if(iLauncher)
{
delete iLauncher;
iLauncher = NULL;
}
iLauncher = CBrowserLauncher::NewL();
iLauncher->LaunchBrowserEmbeddedL( *parameter, NULL, NULL, iOverriddenSettings );
CleanupStack::PopAndDestroy();
_LOGENTRY("web ad->");
If you know the content type of the URL, you can discover the UID of the right application and launch it as detailed here.
There are other alternatives:
CVideoPlayerUtility
andCAudioPlayerUtility
. Both haveOpenUrl()
methods.- Use the streaming classes directly (
CMdaAudioOutStream
and friends)
.. and there are other methods too. That all said, if you are targeting Symbian^3 onwards, you might be better off developing in QT - Symbian C++ can very much considered 'deprecated' for app development.
精彩评论