For providers
Make your service play well in TapnWatch
For TV providers and panel operators: what your server should answer so your viewers' live TV, films and series play in every browser, with sound.
Nothing to sign up for. TapnWatch works with any provider that follows the common Xtream API or gives out a playlist link. There is no TapnWatch server in between: the viewer's browser talks to your server directly. This page says what a server should answer so that live TV, films and series play well, with sound, in every browser.
1. The API TapnWatch uses
- Sign in:
player_api.php?username=…&password=…. TapnWatch readsuser_info.auth,status,exp_dateandmax_connections. - Lists:
get_live_categories,get_live_streams,get_vod_categories,get_vod_streams,get_vod_info,get_series_categories,get_series,get_series_infoandget_short_epgfor the guide. Search and a film's other versions askget_vod_streamsandget_seriesonce without acategory_id(the whole list); each browser keeps that list for 24 hours. Send it compressed (gzip): a big list is around 10 MB that way. - Video links:
/live/<user>/<pass>/<id>.ts(and.m3u8),/movie/<user>/<pass>/<id>.<ext>and/series/<user>/<pass>/<id>.<ext>with thecontainer_extensionfrom your lists. - HTTPS: browsers block
httpvideo and API calls on a secure page. Serve the API and the video links over HTTPS.
2. Browser access (CORS and byte ranges)
A web page may only read another server's answers when that server allows it. Answer every player path
(player_api.php, /live/, /movie/, /series/ and the logos) with:
Access-Control-Allow-Origin: *(the login travels in the address, never in a cookie, so*gives a site nothing it does not already hold);- for the preflight (
OPTIONS):Access-Control-Allow-Headers: Range; Access-Control-Expose-Headers: Content-Length, Content-Range, Accept-Ranges.
Film and episode files must answer byte ranges (206 Partial Content). Players jump through a film this way, and
TapnWatch reads the first bytes of a film this way to see which picture and sound it carries.
3. Live channels
- TapnWatch first plays a channel's continuous
.tslink (the lowest delay, the same stream TV apps play) and falls back to its.m3u8playlist. Safari on Apple devices plays the.m3u8playlist. - Sound: web browsers cannot play Dolby (AC-3, E-AC-3) or DTS sound. When a channel's only sound is one of these, send
web players the sound as AAC and keep the picture as it is. A web player is easy to recognise: its requests carry an
Originheader, and TV apps do not send one.
4. Films and episodes
Before a film starts, TapnWatch reads its first bytes (Matroska Tracks or MP4 moov) and decides:
- When the browser plays the file as it is (for example MP4 with H.264 and AAC everywhere, MKV in Chrome and Edge), it plays the file itself.
- When it cannot (Dolby or DTS sound, MKV in Firefox or Safari, or the viewer's language is not the file's first sound track),
it asks for the HLS version of the film at the same link with
.m3u8instead of the file type:/movie/<user>/<pass>/<id>.m3u8, and for an episode/series/<user>/<pass>/<id>.m3u8. - When that link answers
404, TapnWatch plays the file as it is and tells the viewer if its sound cannot play in a browser.
5. The HLS version of a film
Standard HLS (RFC 8216 and Apple's HLS Authoring Specification), the way media servers offer a film to web browsers:
- A master playlist with
EXT-X-STREAM-INF(BANDWIDTH,CODECS,RESOLUTION,FRAME-RATE,VIDEO-RANGE) and oneEXT-X-MEDIA TYPE=AUDIOper sound track of the file, withLANGUAGE(BCP 47, for exampleen),NAMEandCHANNELS. - Sound: every track as stereo AAC (Apple requires stereo AAC). For E-AC-3 or AC-3 tracks you may add a second group with the original sound and a second variant: Apple devices pick it, browsers keep the AAC one.
- Picture: copied as it is, no new encoding. HEVC tagged
hvc1for Apple devices. - Pieces: fragmented MP4 (CMAF), about 6 seconds each, every piece starting at one of the film's own key frames, with
EXT-X-MAPfor the init andEXT-X-ENDLIST(a VOD playlist for the whole film). - Time: keep the film's own timestamps in every piece, so a jump or a change of sound track stays in sync. Start the sound of each part at the same key frame as its picture.
- One connection: players ask the picture and the sound pieces separately; make both from one read of the file.
- The names and paths of the parts are up to you. Relative links are read from the address of the
.m3u8.
An example master playlist for a film with English and Spanish sound (the English one also as E-AC-3):
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="English",LANGUAGE="en",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2",URI="1234/a0.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Spanish",LANGUAGE="es",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2",URI="1234/a1.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="ec-3",NAME="English",LANGUAGE="en",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="6",URI="1234/ac0.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=9000000,AVERAGE-BANDWIDTH=7000000,CODECS="hvc1.2.4.L150.B0,mp4a.40.2",RESOLUTION=3840x2160,FRAME-RATE=23.976,VIDEO-RANGE=SDR,AUDIO="aac"
1234/v.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=9800000,AVERAGE-BANDWIDTH=7600000,CODECS="hvc1.2.4.L150.B0,ec-3",RESOLUTION=3840x2160,FRAME-RATE=23.976,VIDEO-RANGE=SDR,AUDIO="ec-3"
1234/vc.m3u8
And the start of a media playlist:
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="v_init.mp4"
#EXTINF:6.006000,
v_0.m4s
#EXTINF:6.256000,
v_1.m4s
...
#EXT-X-ENDLIST
6. Parental PIN (optional)
If your service locks some categories behind a PIN: add "pin_set": "1" to user_info for a login with a
PIN. TapnWatch then shows a PIN box and adds &pin=<PIN> to its player_api.php calls. Answer the
locked categories only when the PIN is right. TapnWatch keeps the PIN only until the browser is closed.
7. Test checklist
- Sign in at tapnwatch.com with a test login.
- A live channel plays with sound in Chrome, Firefox and Safari, also a channel with Dolby sound.
- An MP4 film plays and jumps. An MKV film plays in Firefox. A film with Dolby sound plays with sound.
- A film with several languages starts in the browser's language and offers the others in the sound menu.
- After a jump and after a change of sound track, the sound still matches the picture.
- The answers carry
Access-Control-Allow-Originwhen the request has anOriginheader.
Questions: [email protected].
Last updated 23 November 2026.