Integrating the TrueVisions NOW mini-app
The mini-app is a web application that runs inside your app's WebView (or an iframe on the web). It brings TrueVisions NOW browse pages, sign-in and video playback to your users without a native SDK. This guide is for the team building the host app.
What you get
- Browse pages: sport, series and content detail, themed per partner.
- A sign-in hand-off that turns your app's user into an entitled TrueVisions viewer, without cookies.
- A built-in video player (Bitmovin) with free previews for paid titles, or a hand-off so your own player plays the stream.
- A JSON message bridge so your app hears what the viewer did (tapped content, closed the screen, needs to subscribe) and can control playback.
URLs
Every screen lives under /[lang]/[partner]/…. lang is th or en. partner is the slug TrueVisions assigns to your app (for example trueapp, tmn, 7eleven, trueid). Add ?embed=1 to every URL you open from a native WebView.
| Screen | Path |
|---|---|
| Sign-in | POST your token to any page below (or /[lang]/[partner]/auth/landing) |
| Partner home | /[lang]/[partner]?embed=1 |
| Sport mini-app | /[lang]/[partner]/sport?embed=1 |
| Series mini-app | /[lang]/[partner]/series?embed=1 |
| The Voice 2026 mini-app | /[lang]/[partner]/thevoice?embed=1 |
| Content detail | /[lang]/[partner]/content/[id]?embed=1 |
| Player for a title / episode | /[lang]/[partner]/play/[id]?ep=[episodeId]&embed=1 |
| Live channel player | /[lang]/[partner]/watch/[channelId]?embed=1 |
| Environment | Origin |
|---|---|
| This deployment | https://mini-app.truevisions.co.th |
| Production | Provided by TrueVisions at onboarding. |
The integration in five steps
- Install. Configure a WebView with JavaScript, DOM storage, inline media and protected-media permission, then inject the message bridge. See Install in your app.
- Sign the viewer in. Open the WebView on the page you want with a POST carrying your access token. The mini-app talks to TrueID AAA and shows that page signed in. There is no guest mode: a page opened without a token sends the viewer to TrueID sign-in. See Authentication.
- Listen. Handle
ready,auth-state,open-content,close,subscribe,orientation. See postMessage bridge. - Play. Decide whether the mini-app plays video itself or hands the tap to your player. See Player.
- Enable DRM. Grant the WebView the protected-media permission so Widevine / FairPlay licences work. See DRM in WebViews.
Quick start
The shortest possible integration: open the sport page signed-out and react to a tap.
https://mini-app.truevisions.co.th/th/trueapp/sport?embed=1{ "channel": "truevision-app", "type": "ready" }
{ "channel": "truevision-app", "type": "auth-state", "state": "signed-out" }
{ "channel": "truevision-app", "type": "open-content", "id": "…", "contentType": "movie", "lang": "th",
"nowUrl": "https://now.truevisions.co.th/th/content/…" }Testing without credentials
Non-production deployments ship a mock host page at https://mini-app.truevisions.co.th/api/mock/host. It POSTs to the landing endpoint the way your app would and lets you pick a sign-in scenario (bound, unbound, expired, …). Use it to see the full flow in a desktop browser before wiring your WebView.