summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 7a4ed74c4c..d6d128eb29 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -67,7 +67,8 @@ LLMediaCtrl::Params::Params()
decouple_texture_size("decouple_texture_size", false),
texture_width("texture_width", 1024),
texture_height("texture_height", 1024),
- caret_color("caret_color")
+ caret_color("caret_color"),
+ initial_mime_type("initial_mime_type")
{
tab_stop(false);
}
@@ -92,7 +93,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mDecoupleTextureSize ( false ),
mTextureWidth ( 1024 ),
mTextureHeight ( 1024 ),
- mClearCache(false)
+ mClearCache(false),
+ mHomePageMimeType(p.initial_mime_type)
{
{
LLColor4 color = p.caret_color().get();
@@ -101,7 +103,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
setIgnoreUIScale(p.ignore_ui_scale);
- setHomePageUrl(p.start_url);
+ setHomePageUrl(p.start_url, p.initial_mime_type);
setBorderVisible(p.border_visible);
@@ -567,12 +569,12 @@ void LLMediaCtrl::navigateHome()
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::setHomePageUrl( const std::string urlIn )
+void LLMediaCtrl::setHomePageUrl( const std::string& urlIn, const std::string& mime_type )
{
mHomePageUrl = urlIn;
if (mMediaSource)
{
- mMediaSource->setHomeURL(mHomePageUrl);
+ mMediaSource->setHomeURL(mHomePageUrl, mime_type);
}
}
@@ -616,7 +618,7 @@ bool LLMediaCtrl::ensureMediaSourceExists()
if ( mMediaSource )
{
mMediaSource->setUsedInUI(true);
- mMediaSource->setHomeURL(mHomePageUrl);
+ mMediaSource->setHomeURL(mHomePageUrl, mHomePageMimeType);
mMediaSource->setVisible( getVisible() );
mMediaSource->addObserver( this );
mMediaSource->setBackgroundColor( getBackgroundColor() );