BLOG

Live-stream and voice-chat gift SVGA delivery specification and QA checklist

Live-stream and voice-chat gift SVGA delivery specification and QA checklist

TL;DR

  • Budget canvas and RGBA RAM by slot concurrency: full-screen gifts (750 × 1334 portrait reference) play one at a time in a queue, whereas voice-chat avatar frames (240 × 240) and badges often run 8–12 simultaneous instances and require tight ∑ w × h × 4 memory caps.
  • Lock imageKey names and multilingual text safety before export: verify circular avatar masking and stress-test setText slots with CJK, long English usernames, and Arabic (RTL) strings inside the SVGA Online Editor.
  • Keep gift audio subordinate to voice chat: pause or duck gift MP3 audio when hosts or speakers talk, stop previous audio immediately on gift skip, and note that SVGAPlayer-Web-Lite does not play embedded audio.
  • Replace informal handoffs with a shared 11-field spec and 35-point QA pass: validate alpha edges in the SVGA Online Player and shrink oversized bitmaps in the SVGA Online Compressor before shipping.

Six standard gift and effect slots

Slot type Reference canvas (px) Safe zone & layout constraints Loop & cleanup behavior Typical concurrency
Full-screen luxury gift 750 × 1334 (9:16) Keep primary visuals in the center-upper 60%; clear the top host bar (~16%) and bottom chat/input bar (~28%) Play once (loops = 1), clear on stop Queued (1 at a time)
Entrance ride / VIP banner 750 × 200 to 750 × 300 Pad left/right margins for rounded corners and notches; no hard canvas-edge clipping Enter, hold briefly, exit Queued (1–2 streams)
Voice-chat avatar frame 240 × 240 (or 2× 480 × 480) Transparent circular center cutout aligned to avatar component; keep seat badges unobstructed Infinite loop (loops = 0) High (8–12 seats on screen)
Mic seat speaking wave 180 × 180 to 240 × 240 Prefer ShapeEntity vectors or small bitmaps; never export full-canvas transparent PNGs for thin rings Loop while user speaks High (multiple seats active)
Chat bubble skin Fixed badge or padded frame Keep inner text reading area clear and low-contrast behind message text Play once or loop subtly Medium–high (scrolling chat)
Gift icon / VIP badge 120 × 120 to 160 × 160 Clean edges free of white/dark halos on both light and dark chat panels loops = 0 or state-triggered High (repeated in chat feed)

Download v2-gift-stage (750 × 1334 safe-zone reference) and v2-avatar-frame (240 × 240 transparent cutout reference) from the SVGA test samples library as starting templates.


Concurrency and low-end device fallback architecture

Avoid shipping a single heavy tier to every device class. Structure delivery across three tiers:

  1. Primary tier (full SVGA 2.0 or video effect): runs on mid-range and flagship hardware; releases decoded textures immediately when playback finishes (clear()).
  2. Constrained fallback tier: serves downscaled or reduced-bitmap SVGA 2.0 packages on low-RAM phones or weak networks; in battery-saver mode, pauses decorative loops on inactive voice seats.
  3. Static cover fallback: shows a lightweight PNG/WebP icon immediately while .svga downloads or if parsing fails, keeping gift bars and chat cells responsive.

Dynamic slot contract (imageKey, circular avatars, and CJK / EN / Arabic RTL safety)

Animations calling setImage or setText at runtime require strict contract alignment between designers and engineers:

  1. Stable ASCII imageKey names: lock explicit keys such as avatar_slot and banner_text_slot. Never rely on auto-generated localized or numeric layer IDs that shift on re-export.
  2. Circular avatar masking: either pass pre-masked circular PNGs from the client into setImage, or bind a matteKey circular mask layer in the composition (requires iOS >= 2.5.0 / Android >= 2.5.x).
  3. Prevent CJK, English, and Arabic RTL text overflow:
    • CJK nicknames are dense vertically; unspaced English handles clip horizontally; Arabic RTL strings and mixed bidirectional (bidi) names shift visual alignment around centered anchors.
    • Define fixed bounding widths, ellipsis truncation (...), and explicit text direction in the slot spec.
    • Load v2-dynamic-slot from the samples library or your own asset into the SVGA Online Editor to test CJK, long English, and Arabic RTL presets live on stage and generate copy-ready SDK snippets containing the exact imageKey.

Audio ducking and concurrency rules

  • Voice chat always wins: duck or mute gift AudioEntity MP3 tracks when active voice speakers are talking or global room mute is enabled.
  • Stop audio on gift skip: when a new combo gift interrupts the active full-screen animation, halt playback audio immediately (SVGASoundManager.release() on Android 2.6.0+, stop player on iOS) so two tracks never stack.
  • Account for Web Lite: because SVGAPlayer-Web-Lite (svga) ignores embedded AudioEntity tracks, mute web-only loops or route audio through a separate Web Audio trigger on user interaction.

11-field design-to-engineering handoff sheet

# Field Example specification
1 Asset ID gift_crown_full_v2
2 Slot category Full-screen gift / Avatar frame / Entrance banner
3 Target canvas (W × H) 750 × 1334 (safe zone: center-upper 600 × 760)
4 FPS & frame count 24 FPS / 72 frames (3.00s)
5 Loop & end behavior loops = 1, clearsAfterStop = true
6 Container version SVGA 2.0.0 (raw zlib + Protobuf, not 1.x ZIP)
7 Dynamic imageKey map avatar_slot (160×160 circle), banner_text_slot (360×64, max 12 chars / RTL safe)
8 Uses matteKey track matte Yes (requires iOS >= 2.5.0, Android >= 2.5.x)
9 Uses AudioEntity track Yes (chime_audio, frames 0–30; muted on Web Lite)
10 Measured wire bytes & RGBA RAM 380 KB / 11.4 MiB (verified in SVGA Online Player)
11 Fallback asset gift_crown_lite.svga + static gift_crown_cover.png

35-item pre-launch QA checklist

A. Canvas & safe-zone layout (1–5)

  1. Canvas aspect ratio matches the target native/Web container with no distortion.
  2. Full-screen gift hero elements stay clear of top host bars and bottom chat/input overlays.
  3. Banners and badges leave corner/notch clearance on modern phones.
  4. Avatar frame circular cutout aligns cleanly with the client’s avatar view bounds.
  5. Soft-feathered edges fade to zero alpha before touching canvas borders (no hard clip line).

B. Alpha cleanliness & visual quality (6–10)

  1. No white or light halos appear over dark checkerboards in the SVGA Online Player.
  2. No dark premultiplied fringes appear over light checkerboards.
  3. PNG-8 quantized glows remain free of visible color banding.
  4. Small numbers, prices, and 1 px outlines stay sharp at target physical phone scale.
  5. First and last frames of infinite-loop assets (loops = 0) connect smoothly with zero jump.

C. Wire size & RGBA memory budget (11–15)

  1. Orphan images and duplicate identical frames in MovieEntity.images have been removed.
  2. No bitmap exceeds 1024 × 1024 or carries large transparent borders around a tiny icon.
  3. Total decoded RGBA memory (∑ w × h × 4) fits the slot’s low-end device budget.
  4. Oversized assets passed through the SVGA Online Compressor without growing larger.
  5. Redundant trailing static hold frames trimmed; frame-by-frame FPS tuned (24/20/15 fps).

D. Dynamic slots & multilingual text (16–20)

  1. imageKey identifiers remained intact across design revisions.
  2. Square, portrait, and landscape photos tested in setImage via the SVGA Online Editor.
  3. Short CJK, long unspaced English, and Arabic RTL strings tested in setText slots for clipping/overlap.
  4. Placeholder slot bitmaps are transparent or clean defaults before dynamic injection runs.
  5. matteKey masks align cleanly with dynamic replacements without offset artifacts.

E. Audio & timeline sync (21–25)

  1. Embedded MP3 files include ID3v2 headers (SUQz) for Web Classic compatibility.
  2. AudioEntity.startFrame and endFrame match key visual impact frames.
  3. Interrupting or skipping gifts stops the active sound immediately without overlapping audio.
  4. Gift sound effects obey room mute toggles and duck beneath active voice speakers.
  5. Silent avatar frames and Web-Lite-only assets contain zero leftover AudioEntity blobs.

F. Cross-platform SDK compatibility (26–30)

  1. Output validated as SVGA 2.0 (not 1.x ZIP) for SVGAPlayer-Web-Lite and flutter_svga.
  2. Minimum app versions verified when matteKey is present (iOS >= 2.5.0, Android >= 2.5.x).
  3. Android release builds include ProGuard / R8 keep rules for Wire and SVGA Proto classes.
  4. Remote CDN URLs return valid HTTPS + Access-Control-Allow-Origin headers for Web.
  5. Static cover images and fallback tiers are uploaded and verified alongside primary files.

G. Lifecycle & memory cleanup (31–35)

  1. Three consecutive loops play smoothly on a low-end test device without thermal/frame stalls.
  2. Scrolling lists (RecyclerView / UICollectionView / FlatList) never show recycled avatars from previous cells.
  3. Playback stop and screen exit call stopAnimation(), clearDynamicObjects(), and clear() / destroy().
  4. Web SPA routes (Vue / React) destroy both Player and Parser Workers on unmount.
  5. Memory returns cleanly to baseline after ten back-to-back gift triggers with zero upward drift.