diff options
author | Rider Linden <rider@lindenlab.com> | 2015-10-09 10:09:18 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-10-09 10:09:18 -0700 |
commit | 295d392b1c1ed6182eb2dce528fd396eab2ed2b2 (patch) | |
tree | e949a892b537f062b973e4175c624b41aae4f332 /indra/media_plugins/cef/media_plugin_cef.cpp | |
parent | 0725bd2d5eddee94e9adc64b83f4c457b9cac725 (diff) |
MAINT-5715, MAINT-5717, MAINT-5718: Replace the the volume catcher that was removed with the QT viewer. Addresses panning and fading issues, teleport and viewer mute controls.
Diffstat (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp')
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 5b9ff6cac8..3f3d9dc657 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -39,6 +39,7 @@ #include "boost/function.hpp" #include "boost/bind.hpp" #include "llCEFLib.h" +#include "volume_catcher.h" //////////////////////////////////////////////////////////////////////////////// // @@ -76,6 +77,7 @@ private: void unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data); void checkEditState(); + void setVolume(F32 vol); bool mEnableMediaPluginDebugging; std::string mHostLanguage; @@ -92,6 +94,8 @@ private: std::string mCachePath; std::string mCookiePath; LLCEFLib* mLLCEFLib; + + VolumeCatcher mVolumeCatcher; }; //////////////////////////////////////////////////////////////////////////////// @@ -332,6 +336,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) { mLLCEFLib->update(); + mVolumeCatcher.pump(); // this seems bad but unless the state changes (it won't until we figure out // how to get CEF to tell us if copy/cut/paste is available) then this function // will return immediately @@ -630,7 +635,15 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mJavascriptEnabled = message_in.getValueBoolean("enable"); } } - else + else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME) + { + if (message_name == "set_volume") + { + F32 volume = (F32)message_in.getValueReal("volume"); + setVolume(volume); + } + } + else { //std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl; }; @@ -763,6 +776,11 @@ void MediaPluginCEF::checkEditState() } } +void MediaPluginCEF::setVolume(F32 vol) +{ + mVolumeCatcher.setVolume(vol); +} + //////////////////////////////////////////////////////////////////////////////// // bool MediaPluginCEF::init() |