feat: a video on several products, sound and expand on the floating player, upright vertical video, looping cards at the foot of the home (Rodada 5, D7)

site_videos.products (the old product column is kept and copied); one
floating video per product checks the overlap and names it. The floating
player starts muted, with a sound button that says its state and an
expand button to the large player. A vertical video stands upright on
the floating and the large player. The home's videos move to its foot as
muted looping cards that play only on screen, not at all with reduced
motion, and open the large player.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-30 16:03:51 -03:00
parent 22239f21d8
commit 21858b5764
7 changed files with 218 additions and 69 deletions

View File

@@ -47,9 +47,22 @@ def run():
published = client.call('/site/videos')['videos']
entry = next(row for row in published if row['id'] == 'sala')
assert entry['product'] == 'file'
assert entry['products'] == ['file'], entry
assert entry['captions'] == '/api/site/videos/sala/captions'
# The same video can appear on more than one product; duplicates are
# dropped and the order follows the product catalog.
operator.call('/operator/site-videos/sala', {'upload_id': video,
'captions_id': captions, 'products': ['uv', 'file', 'uv'], 'enabled': True})
entry = next(row for row in client.call('/site/videos')['videos'] if row['id'] == 'sala')
assert entry['products'] == ['file', 'uv'], entry
assert entry['product'] == 'file', entry
# One floating video per product: a second one is refused before any
# copy, naming the video that holds the product (DTF-WEB-G).
# copy, naming the video and the product in conflict (DTF-WEB-G).
refused = operator.call('/operator/site-videos/png', {'upload_id': video,
'products': ['uv'], 'enabled': True}, expected=409)
assert 'A sala às 3 da manhã' in refused['detail'], refused
assert 'Artes avulsas · UV' in refused['detail'], refused
# The old single `product` still works and is refused the same way.
refused = operator.call('/operator/site-videos/png', {'upload_id': video,
'product': 'file', 'enabled': True}, expected=409)
assert 'A sala às 3 da manhã' in refused['detail'], refused