Display CMS: Upload-Fehler abfangen und kaputte Bilder im Player überspringen.
Mediathek-Uploads legen keinen Datensatz mehr an, wenn der Datei-Write fehlschlägt (verhindert 404-Einträge auf den Displays). Der Player überspringt Bilder mit Ladefehler nach 2s statt Schwarzbild zu zeigen. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
2a34adc515
commit
193d37b1ce
6 changed files with 211 additions and 62 deletions
|
|
@ -444,6 +444,15 @@ test('display player keeps previews in a strict 9 by 16 viewport', function () {
|
|||
->toContain('container-type: size;')
|
||||
->toContain("if (hostname === 'cabinet.b2in.eu') {")
|
||||
->toContain("return 'https://portal.b2in.eu';")
|
||||
->toContain('startConfigPolling')
|
||||
->toContain('startFileVersionPolling')
|
||||
->toContain('playerFileCheckUrl')
|
||||
->toContain('readPlayerFileVersion')
|
||||
->toContain('Player-Datei geändert')
|
||||
->toContain('Playlist geändert')
|
||||
->toContain('DISPLAY_PORTAL_BASE_URL')
|
||||
->toContain("url.startsWith('/_cabinet/')")
|
||||
->toContain('`${DISPLAY_PORTAL_BASE_URL}${url}`')
|
||||
->toContain('/api/display/overview')
|
||||
->toContain('Aktive Live-Displays')
|
||||
->toContain('renderOverview(data.displays || [])')
|
||||
|
|
@ -481,6 +490,15 @@ test('display player keeps previews in a strict 9 by 16 viewport', function () {
|
|||
->toContain('background: none');
|
||||
});
|
||||
|
||||
test('display player skips broken images instead of showing a black frame', function () {
|
||||
$player = file_get_contents(public_path('_cabinet/display/index.html'));
|
||||
|
||||
expect($player)
|
||||
->toContain('img.onerror = () => {')
|
||||
->toContain('[B2in] Image error:')
|
||||
->toContain('setTimeout(finish, 2000);');
|
||||
});
|
||||
|
||||
test('display player stops looping when the playlist has no playable content', function () {
|
||||
$player = file_get_contents(public_path('_cabinet/display/index.html'));
|
||||
|
||||
|
|
@ -510,10 +528,12 @@ test('preview player is served with a revalidation cache header', function () {
|
|||
$display = Display::factory()->create(['preview_token' => 'fresh-token']);
|
||||
$version = DisplayVersion::factory()->create();
|
||||
|
||||
foreach ([
|
||||
'/preview/fresh-token',
|
||||
"/preview/module/{$version->id}",
|
||||
] as $url) {
|
||||
foreach (
|
||||
[
|
||||
'/preview/fresh-token',
|
||||
"/preview/module/{$version->id}",
|
||||
] as $url
|
||||
) {
|
||||
$response = $this->get($url);
|
||||
$response->assertSuccessful();
|
||||
expect($response->headers->get('Cache-Control'))->toContain('no-cache');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue