summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmedia.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-03-18 15:17:49 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-03-18 15:17:49 +0200
commit3a1400015ae41ca8e185a284b9e2cc0006defa63 (patch)
treed4d258a356c02f8fd5cf05c72ff42d8a34c4ded3 /indra/newview/llviewerparcelmedia.cpp
parent729f880f78e26459d37ff0d120d9537791ccaf8d (diff)
parent76dc796a1a70290b00c47d0c43d8c8ba237dd7ac (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewerparcelmedia.cpp')
-rw-r--r--indra/newview/llviewerparcelmedia.cpp49
1 files changed, 28 insertions, 21 deletions
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 2c5c0a37e8..b967436df6 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -210,25 +210,29 @@ void LLViewerParcelMedia::play(LLParcel* parcel)
// A new impl will be created below.
}
}
-
- if(!sMediaImpl)
+
+ // Don't ever try to play if the media type is set to "none/none"
+ if(stricmp(mime_type.c_str(), "none/none") != 0)
{
- LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL;
-
- // There is no media impl, make a new one
- sMediaImpl = LLViewerMedia::newMediaImpl(
- placeholder_texture_id,
- media_width,
- media_height,
- media_auto_scale,
- media_loop);
- sMediaImpl->setIsParcelMedia(true);
- sMediaImpl->navigateTo(media_url, mime_type, true);
- }
+ if(!sMediaImpl)
+ {
+ LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL;
+
+ // There is no media impl, make a new one
+ sMediaImpl = LLViewerMedia::newMediaImpl(
+ placeholder_texture_id,
+ media_width,
+ media_height,
+ media_auto_scale,
+ media_loop);
+ sMediaImpl->setIsParcelMedia(true);
+ sMediaImpl->navigateTo(media_url, mime_type, true);
+ }
- //LLFirstUse::useMedia();
+ //LLFirstUse::useMedia();
- LLViewerParcelMediaAutoPlay::playStarted();
+ LLViewerParcelMediaAutoPlay::playStarted();
+ }
}
// static
@@ -312,11 +316,14 @@ std::string LLViewerParcelMedia::getURL()
if(sMediaImpl.notNull())
url = sMediaImpl->getMediaURL();
- if (url.empty())
- url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL();
-
- if (url.empty())
- url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaURL();
+ if(stricmp(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaType().c_str(), "none/none") != 0)
+ {
+ if (url.empty())
+ url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL();
+
+ if (url.empty())
+ url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaURL();
+ }
return url;
}