diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-10-26 17:59:45 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-10-26 17:59:45 -0700 |
commit | 4767b546e6917ab4b2561553cf617d577fe998ff (patch) | |
tree | bde6438cb15fa08ae05529072f0dfbc27ca7962f /indra/media_plugins/quicktime | |
parent | 7f25433ccbdfb51e7e71722d4cc91ac0bef65871 (diff) |
Fix for DEV-41638 (current URL is not propagated if media changes from website to media).
Made the quicktime plugin send navigate_begin and navigate_complete events.
This should allow the viewer's logic for sending prim media navigate events to work when loading quicktime media.
Diffstat (limited to 'indra/media_plugins/quicktime')
-rw-r--r-- | indra/media_plugins/quicktime/media_plugin_quicktime.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index 7100d03f05..c9ee1c8ac7 100644 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -79,6 +79,7 @@ private: const int mMinHeight;
const int mMaxHeight;
F64 mPlayRate;
+ std::string mNavigateURL;
enum ECommand {
COMMAND_NONE,
@@ -179,6 +180,11 @@ private: setStatus(STATUS_ERROR);
return;
};
+
+ mNavigateURL = url;
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
+ message.setValue("uri", mNavigateURL);
+ sendMessage(message);
// do pre-roll actions (typically fired for streaming movies but not always)
PrePrerollMovie( mMovieHandle, 0, getPlayRate(), moviePrePrerollCompleteCallback, ( void * )this );
@@ -389,11 +395,18 @@ private: static void moviePrePrerollCompleteCallback( Movie movie, OSErr preroll_err, void *ref )
{
- //MediaPluginQuickTime* self = ( MediaPluginQuickTime* )ref;
+ MediaPluginQuickTime* self = ( MediaPluginQuickTime* )ref;
// TODO:
//LLMediaEvent event( self );
//self->mEventEmitter.update( &LLMediaObserver::onMediaPreroll, event );
+
+ // Send a "navigate complete" event.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
+ message.setValue("uri", self->mNavigateURL);
+ message.setValueS32("result_code", 200);
+ message.setValue("result_string", "OK");
+ self->sendMessage(message);
};
|