Guide · Developer
How to Add 3D Gift Assets to an RTC App
Plan an RTC gift integration from asset choice to validated events, client playback, duplicate handling and testing on mobile devices.
- Author
- VoltKit
- Published
- Reading time
- 2 min read
This guide outlines an application architecture for RTC with 3D gifts. It is not a copy-and-paste SDK API: VoltKit's catalogue release does not include a built-in sendGift method or a gift player. Use the current RTC quickstart for room communication, then build the gifting flow within your application.
1. Choose and record the asset
Browse the watermarked gallery, inspect the listed format and read the gift licence. Sign in to see prices. After purchasing, download the original from My gifts and record its gift ID and order with your team's asset inventory.
Confirm that your intended player handles the original. If you are preparing your own animation, SVGA Maker may be part of your authoring workflow; it is not an automatic runtime integration.
2. Define a server-authorised event
Choose your own application message format. For example, an accepted gift event might identify the event, room, sender, recipient, gift and creation time. These are conceptual fields, not a promised VoltKit SDK payload.
Your backend validates membership, permissions and any virtual-currency operation. Give each request an idempotency key so a retry cannot debit a balance twice. Publish the accepted event only after the state change succeeds. If there is no paid user action, still validate who may trigger effects in the room.
3. Resolve and play on the client
Receiving clients map the gift identifier to an approved asset in your delivery system. Avoid accepting arbitrary image or script URLs supplied by another participant. Deduplicate event identifiers, limit the playback queue and decide when an old event should expire.
Make the acknowledgement meaningful without motion. A text entry can name the sender, recipient and gift while a visual effect plays. Keep the call controls and captions usable throughout playback.
4. Decide what recording means
An overlay drawn in your app UI is not automatically part of a server recording or an external broadcast. If recording the effect is a requirement, design and test the composition path explicitly. Document whether the acknowledgement belongs to the live interface, the recording or both.
5. Verify failures before launch
Test two clients, then test reconnects, duplicate events, a missing asset, a recipient leaving and several gifts arriving together. Simulate a rejected balance operation and ensure no success acknowledgement is published. Confirm that closing the room stops its animation and releases resources.
Finally, follow the mobile animation checklist. The goal is a complete, understandable interaction whose visual effect supports the conversation.
Frequently asked questions
Does buying a gift add it automatically to the RTC SDK?
No. The store provides an asset licence and download. Your team implements the gift events, playback and any end-user currency inside your app.
Should a client be allowed to decide that a paid gift succeeded?
Your server should validate the action and any balance change, then issue the accepted event. A client-side animation is presentation, not proof of a transaction.