- Overlay\Build id (plugin version + admin epoch) in X-SG-Build; overlay.js reloads once on mismatch (loop-guarded); 'Refresh all overlays now' - Media URLs carry ?v=<mtime> - Alert option 'Frameless' (schema v5): no box so transparent PNG/GIF/WebP and VP9-alpha WebM show through; admin preview with checkerboard and ffmpeg help Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
27 lines
923 B
PHP
27 lines
923 B
PHP
<?php
|
|
declare( strict_types=1 );
|
|
|
|
namespace StreamGoals\Overlay;
|
|
|
|
/** Optional capability: configurable alert media (definitions, triggered rewards, attachment lookup). */
|
|
interface AlertMediaSource {
|
|
|
|
/** Enabled alert definitions, raw rows. Called at most once per request. */
|
|
public function alertDefs(): array;
|
|
|
|
/**
|
|
* Rewards triggered per donation, one lookup for the whole page.
|
|
*
|
|
* @param int[] $donationIds
|
|
* @return array<int,array<int,array{action_id:int,amount_minor:int,title:string}>> donation id => rewards
|
|
*/
|
|
public function triggeredActionsFor( array $donationIds ): array;
|
|
|
|
/**
|
|
* Server-side attachment lookup (the only place media URLs come from). Null when it is gone.
|
|
*
|
|
* @return array{url:string,mime:string,v?:int,modified?:string}|null (v = file mtime, modified = post_modified_gmt; used only for the ?v= cache-bust suffix)
|
|
*/
|
|
public function attachment( int $id ): ?array;
|
|
}
|