How to Enable Tunnel Mode Playback
The main changes required to enable Tunnel Mode playback are as follows:-
Query the AudioTrack session ID from AudioManager:
-
Configure Video Decoder for Tunnel mode:
-
Configure Video Decoder with the AudioTrack session ID.
-
Create AudioTrack with the previously queried session ID and set the AudioAttributes flag
FLAG_HW_AV_SYNC. -
Do not call
dequeueOutputBufferandreleaseOutputBufferfor video decoder. - AudioTrack provides a write API that automatically constructs the additional header information. For details, see here.
More Details about Tunnel Mode Playback
On Fire OS 14 and later, update your player from ExoPlayer to Media3. For more details, refer to the following Tunnel Mode playback implementation:- Enable tunneling end-to-end
- Support tunneling in video renderer
- Report tunneling support via RendererCapabilities API
- Plumbing to enable tunneling on AudioTrack from renderers
Limitations of Tunneled Mode
This Tunneled Mode playback information here applies to all Fire TV devices that run Fire OS 6 or later, with these constraints:-
All Fire TV Streaming Media Players that run Fire OS 6 or later support tunneled mode for VP9 and HEVC decoders, with these limitations:
- For Fire TV Cube 2nd Gen (2019): Only secure decoders support tunneled mode, but applications can still use a secure decoder pipeline for clear content if they want to play clear content in tunneled mode. See secure decoder requirements.
-
All Fire TVs support tunnel mode for popular video codecs such as H.264, H.265, and VP9 for both secure and non-secure playback, with these limitations:
- Insignia HD - Fire TV (2018), Toshiba HD - Fire TV (2018), and Toshiba 4K - Fire TV (2018) do not support mono or multi channel PCM.

