diff options
| author | Darl <me@darl.cat> | 2025-04-25 17:46:38 -0500 |
|---|---|---|
| committer | Darl <me@darl.cat> | 2025-05-28 10:49:02 -0500 |
| commit | ea75bfd4103c4074a8925e8abb14fa73e79821cc (patch) | |
| tree | 01962dbac5f446429941eb6e7b91f62034127091 /indra/newview/llvovolume.cpp | |
| parent | aeefc73129978f6f2c1ba8caaff2750eff2cfbb3 (diff) | |
Implement support for PRIM_MEDIA_FIRST_CLICK_INTERACT and autoplay for HUD media
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rw-r--r-- | indra/newview/llvovolume.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4e8932f912..516d7328c6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2640,6 +2640,17 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m } viewer_media_t media_impl = LLViewerMedia::getInstance()->updateMediaImpl(mep, previous_url, update_from_self); + static LLCachedControl<bool> media_autoplay_huds(gSavedSettings, "MediaAutoPlayHuds", true); + bool was_loaded = media_impl->hasMedia(); + if (isHUDAttachment() && media_autoplay_huds && !was_loaded) + { + std::string url = mep->getCurrentURL(); + if (media_impl->getCurrentMediaURL() != url) + { + media_impl->navigateTo(url, "", false, true); + } + } + addMediaImpl(media_impl, texture_index) ; } else |
