summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloaterwebcontent.cpp26
-rwxr-xr-xindra/newview/llfloaterwebcontent.h1
-rwxr-xr-xindra/newview/llmimetypes.cpp3
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_web_content.xml88
-rwxr-xr-xindra/newview/skins/default/xui/en/mime_types.xml25
5 files changed, 124 insertions, 19 deletions
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 024e315632..c039b3b8f4 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -81,7 +81,8 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params )
mCommitCallbackRegistrar.add( "WebContent.Reload", boost::bind( &LLFloaterWebContent::onClickReload, this ));
mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this ));
mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this ));
- mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind( &LLFloaterWebContent::onPopExternal, this ));
+ mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind(&LLFloaterWebContent::onPopExternal, this));
+ mCommitCallbackRegistrar.add( "WebContent.TestVideo", boost::bind(&LLFloaterWebContent::onTestVideo, this, _2));
}
BOOL LLFloaterWebContent::postBuild()
@@ -229,7 +230,7 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
{
LL_DEBUGS() << " " << (*iter)->getKey()["target"] << LL_ENDL;
- }
+ }
if(instances.size() >= (size_t)browser_window_limit)
{
@@ -243,9 +244,9 @@ void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
LLViewerMedia::proxyWindowOpened(p.target(), p.id());
- mWebBrowser->setHomePageUrl(p.url, HTTP_CONTENT_TEXT_HTML);
+ mWebBrowser->setHomePageUrl(p.url);
mWebBrowser->setTarget(p.target);
- mWebBrowser->navigateTo(p.url, HTTP_CONTENT_TEXT_HTML, p.clean_browser);
+ mWebBrowser->navigateTo(p.url);
set_current_url(p.url);
@@ -499,7 +500,7 @@ void LLFloaterWebContent::onEnterAddress()
LLStringUtil::trim(url);
if ( url.length() > 0 )
{
- mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
+ mWebBrowser->navigateTo(url);
};
}
@@ -508,9 +509,18 @@ void LLFloaterWebContent::onPopExternal()
// make sure there is at least something there.
// (perhaps this test should be for minimum length of a URL)
std::string url = mAddressCombo->getValue().asString();
- LLStringUtil::trim(url);
- if ( url.length() > 0 )
+ LLStringUtil::trim(url);
+ if (url.length() > 0)
+ {
+ LLWeb::loadURLExternal(url);
+ };
+}
+
+void LLFloaterWebContent::onTestVideo(std::string url)
+{
+ LLStringUtil::trim(url);
+ if (url.length() > 0)
{
- LLWeb::loadURLExternal( url );
+ mWebBrowser->navigateTo(url);
};
}
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 4291fd9f2c..519b575b38 100755
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -92,6 +92,7 @@ protected:
void onClickStop();
void onEnterAddress();
void onPopExternal();
+ void onTestVideo(std::string url);
static void preCreate(Params& p);
void open_media(const Params& );
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index a2df14b4e7..790a184068 100755
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -184,8 +184,7 @@ std::string LLMIMETypes::implType(const std::string& mime_type)
mime_info_map_t::const_iterator it = sMap.find(mime_type);
if (it != sMap.end())
{
- return "media_plugin_libvlc";
- //return it->second.mImpl;
+ return it->second.mImpl;
}
else
{
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index a80440e844..86be363245 100755
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -25,10 +25,10 @@
<layout_panel
auto_resize="false"
default_tab_group="1"
- height="22"
+ height="44"
layout="topleft"
left="0"
- min_height="20"
+ min_height="40"
name="nav_controls"
top="400"
width="770">
@@ -152,6 +152,90 @@
<button.commit_callback
function="WebContent.PopExternal" />
</button>
+
+ <button
+ image_overlay="Video_URL_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="MPEG4 Video Test"
+ enabled="true"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="1"
+ name="VLC Plugin Test"
+ top="22"
+ width="22">
+ <button.commit_callback
+ function="WebContent.TestVideo"
+ parameter="https://callum-linden.s3.amazonaws.com/sample_media/ss.mp4"/>
+ </button>
+
+ <button
+ image_overlay="Video_URL_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="MKV Video Test"
+ enabled="true"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="27"
+ name="VLC Plugin Test"
+ top="22"
+ width="22">
+ <button.commit_callback
+ function="WebContent.TestVideo"
+ parameter="https://callum-linden.s3.amazonaws.com/sample_media/jellyfish.mkv"/>
+ </button>
+
+ <button
+ image_overlay="Video_URL_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="WebM Video Test"
+ enabled="true"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="51"
+ name="VLC Plugin Test"
+ top="22"
+ width="22">
+ <button.commit_callback
+ function="WebContent.TestVideo"
+ parameter="https://callum-linden.s3.amazonaws.com/sample_media/kubo.webm"/>
+ </button>
+
+ <button
+ image_overlay="Video_URL_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="MP3 audio Test"
+ enabled="true"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="75"
+ name="VLC Plugin Test"
+ top="22"
+ width="22">
+ function="WebContent.TestVideo"
+ parameter="https://callum-linden.s3.amazonaws.com/alegria.mp3"/>
+ </button>
+
</layout_panel>
<layout_panel
height="40"
diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml
index e2dcc11fb0..2867204318 100755
--- a/indra/newview/skins/default/xui/en/mime_types.xml
+++ b/indra/newview/skins/default/xui/en/mime_types.xml
@@ -185,7 +185,7 @@
movie
</widgettype>
<impl>
- media_plugin_cef
+ media_plugin_libvlc
</impl>
</mimetype>
<mimetype name="image/*">
@@ -207,7 +207,7 @@
movie
</widgettype>
<impl>
- media_plugin_cef
+ media_plugin_libvlc
</impl>
</mimetype>
<mimetype name="application/javascript">
@@ -449,7 +449,7 @@
movie
</widgettype>
<impl>
- media_plugin_cef
+ media_plugin_libvlc
</impl>
</mimetype>
<mimetype name="video/mp4">
@@ -460,10 +460,21 @@
movie
</widgettype>
<impl>
- media_plugin_cef
+ media_plugin_libvlc
</impl>
</mimetype>
- <mimetype menu="1" name="video/quicktime">
+ <mimetype name="application/octet-stream">
+ <label name="video/octet-stream">
+ Movie
+ </label>
+ <widgettype>
+ movie
+ </widgettype>
+ <impl>
+ media_plugin_libvlc
+ </impl>
+ </mimetype>
+ <mimetype menu="1" name="video/quicktime">
<label name="video/quicktime_label">
Movie (QuickTime)
</label>
@@ -471,7 +482,7 @@
movie
</widgettype>
<impl>
- media_plugin_cef
+ media_plugin_libvlc
</impl>
</mimetype>
<mimetype name="video/x-ms-asf">
@@ -482,7 +493,7 @@
movie
</widgettype>
<impl>
- media_plugin_cef
+ media_plugin_libvlc
</impl>
</mimetype>
<mimetype name="video/x-ms-wmv">