summaryrefslogtreecommitdiff
path: root/indra/media_plugins/libvlc
diff options
context:
space:
mode:
authorCallum Prentice <callum@gmail.com>2016-07-11 19:46:11 -0700
committerCallum Prentice <callum@gmail.com>2016-07-11 19:46:11 -0700
commit8ae7828643fbb04a52a52abefa2133a761dd4179 (patch)
treefa520ee77291c07339df936909ef63b9ab3c9c6a /indra/media_plugins/libvlc
parent067fb126562e586b58c39b9661ca38dc3498d690 (diff)
MAINT-6527 and MAINT-6528 FIX - max volume and media playing prior URLs
Diffstat (limited to 'indra/media_plugins/libvlc')
-rw-r--r--indra/media_plugins/libvlc/media_plugin_libvlc.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
index fdad990b7c..e00602bad8 100644
--- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
+++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
@@ -189,10 +189,35 @@ void MediaPluginLibVLC::playMedia()
gVLCCallbackContext.texture_pixels = mPixels;
gVLCCallbackContext.mp = gLibVLCMediaPlayer;
+ // Send a "navigate begin" event.
+ // This is really a browser message but the QuickTime plugin did it and
+ // the media system relies on this message to update internal state so we must send it too
+ // Note: see "navigate_complete" message below too
+ // https://jira.secondlife.com/browse/MAINT-6528
+ LLPluginMessage message_begin(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
+ message_begin.setValue("uri", mURL);
+ message_begin.setValueBoolean("history_back_available", false);
+ message_begin.setValueBoolean("history_forward_available", false);
+ sendMessage(message_begin);
+
+ // volume should be initialized - when media is in range, the distance based attenuation
+ // will set the correct value
+ // https://jira.secondlife.com/browse/MAINT-6527
libvlc_audio_set_volume(gLibVLCMediaPlayer, 0);
libvlc_video_set_callbacks(gLibVLCMediaPlayer, lock, unlock, display, &gVLCCallbackContext);
libvlc_video_set_format(gLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
libvlc_media_player_play(gLibVLCMediaPlayer);
+
+ // Send a "navigate complete" event.
+ // This is really a browser message but the QuickTime plugin did it and
+ // the media system relies on this message to update internal state so we must send it too
+ // Note: see "navigate_begin" message above too
+ // https://jira.secondlife.com/browse/MAINT-6528
+ LLPluginMessage message_complete(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
+ message_complete.setValue("uri", mURL);
+ message_complete.setValueS32("result_code", 200);
+ message_complete.setValue("result_string", "OK");
+ sendMessage(message_complete);
}
////////////////////////////////////////////////////////////////////////////////