本文整理汇总了C++中LLPluginClassMedia::loadURI方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPluginClassMedia::loadURI方法的具体用法?C++ LLPluginClassMedia::loadURI怎么用?C++ LLPluginClassMedia::loadURI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPluginClassMedia
的用法示例。
在下文中一共展示了LLPluginClassMedia::loadURI方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: navigateTo
void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type)
{
LLPluginClassMedia* plugin = getMediaPlugin();
if(rediscover_type)
{
LLURI uri(url);
std::string scheme = uri.scheme();
if(scheme.empty() || ("http" == scheme || "https" == scheme))
{
if(mime_type.empty())
{
LLHTTPClient::getHeaderOnly( url, new LLMimeDiscoveryResponder(this));
}
else if(initializeMedia(mime_type) && (plugin = getMediaPlugin()))
{
plugin->loadURI( url );
}
}
else if("data" == scheme || "file" == scheme || "about" == scheme)
{
// FIXME: figure out how to really discover the type for these schemes
// We use "data" internally for a text/html url for loading the login screen
if(initializeMedia("text/html") && (plugin = getMediaPlugin()))
{
plugin->loadURI( url );
}
}
else
{
// This catches 'rtsp://' urls
if(initializeMedia(scheme) && (plugin = getMediaPlugin()))
{
plugin->loadURI( url );
}
}
}
else if (plugin)
{
plugin->loadURI( url );
}
else if(initializeMedia(mime_type) && (plugin = getMediaPlugin()))
{
plugin->loadURI( url );
}
else
{
LL_WARNS("Media") << "Couldn't navigate to: " << url << " as there is no media type for: " << mime_type << LL_ENDL;
return;
}
mMediaURL = url;
}
示例2: play
void LLViewerMediaImpl::play()
{
LLPluginClassMedia* plugin = getMediaPlugin();
// first stop any previously playing media
// stop();
// plugin->addObserver( this );
if (!plugin)
{
if(!initializePlugin(mMimeType))
{
// Plugin failed initialization... should assert or something
return;
}
plugin = getMediaPlugin();
}
// updateMovieImage(mTextureId, true);
plugin->loadURI( mMediaURL );
if(/*plugin->pluginSupportsMediaTime()*/ true)
{
start();
}
}
示例3: navigateHome
void LLViewerMediaImpl::navigateHome()
{
LLPluginClassMedia* plugin = getMediaPlugin();
if (plugin)
{
plugin->loadURI( mHomeURL );
}
}