fix(launcher): poster session display — metadata, image modal, file paths
1. launcher_presentation_view: accept session_type prop from parent
instead of relying on event_session_type_code on file objects (which
is not reliably populated in Dexie). Use session_type to correctly
set hide_meta, session_type, and open_method on the file container.
2. launcher_session_view: pass session_type={type_code} to
Launcher_presentation_view; restore Launcher_presenter_view_posters
in the presenter list for poster mode (hide_name=true). Some events
store poster files at the PRESENTER level (for_id=event_presenter_id)
— particularly group/company presenters — so both paths must render.
3. launcher/+layout.svelte: fix poster modal image 403. The img src was
using the event_file download endpoint which requires auth headers a
plain img tag cannot send. Switched to the hosted_file endpoint with
key=account_id, which is browser-compatible. Also guarded on
modal__event_file_obj.hosted_file_id for safer access.
4. launcher_cfg_screen_saver: rename section title to 'Poster Screen Saver'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -870,11 +870,16 @@
|
||||
Close Remote Poster Display Only
|
||||
</button>
|
||||
|
||||
{#if $events_sess.launcher.modal__open_event_file_id}
|
||||
{#if $events_sess.launcher.modal__event_file_obj?.hosted_file_id}
|
||||
<!-- WHY: Use hosted_file endpoint (not event_file) — the event_file download
|
||||
endpoint requires auth headers that a plain <img> tag cannot send (→ 403).
|
||||
The hosted_file endpoint accepts key=account_id as a query param and is
|
||||
the proven browser-compatible path for direct file display. -->
|
||||
<img
|
||||
src="{$ae_api.base_url}/v3/action/event_file/{$events_sess.launcher
|
||||
.modal__open_event_file_id}/download?filename={$events_slct
|
||||
.event_file_obj.filename}&key={$ae_api.account_id}"
|
||||
src="{$ae_api.base_url}/v3/action/hosted_file/{$events_sess.launcher
|
||||
.modal__event_file_obj.hosted_file_id}/download?return_file=true&filename={encodeURIComponent(
|
||||
$events_sess.launcher.modal__event_file_obj.filename ?? ''
|
||||
)}&key={$ae_api.account_id}"
|
||||
alt="Poster"
|
||||
class="min-h-28 min-w-md max-h-full max-w-full"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user