Visual Studio Code extension providing language support for M3U8 (HLS) files.
- Syntax highlighting for:
- HLS tags, attributes and their values
- URIs and URLs
- Numbers and durations, date, strings
- Comments
- Invalid attributes (as per the HLS specification)
- Remote playlist support:
- Open and view remote M3U8 playlists directly in VS Code
- Clickable links to navigate between multi-variant playlists and variants
- Auto-refresh support for live playlists with configurable interval (defaulting to #EXT-X-TARGETDURATION)
- Manual refresh option for on-demand updates
- Download segments from media playlists with a single click
- Smart link handling: opens playlists, downloads segments
- SCTE-35 parsing:
- Parse a SCTE-35 payload with a command
- Parse SCTE-35 payloads in HLS tags in the current file (code lens)
- Display the results in a new tab, formatted or as JSON
- Configurable decorations:
- Folding support for segments and associated tags
- Colour banding of segments for easier reading
- Including specific colors for segments with chosen tags
- Segment number decoration on each line, with running duration and (where applicable) program date time
- Gutter icons for specific tags (in multivariant playlists and for cues and signals)
- Documentation for HLS tags on hover, and links to the relevant sections of the HLS specification
.m3u8
.m3u
This extension contributes the following settings:
m3u8.features.colorBanding
: Enable color banding of segments for easier reading (default:true
)m3u8.features.segmentNumbering
: Show segment numbers in the right margin (default:true
)m3u8.features.folding
: Enable folding support for segments and associated tags (default:true
)m3u8.features.gutterIcons
: Show gutter icons for playlist pointers in multivariant playlists (default:true
)m3u8.features.showRunningDuration
: Show running duration for each segment (default:true
)m3u8.features.showProgramDateTime
: Show effective timestamp for each segment (default:true
)m3u8.features.clickableLinks
: Enable clickable links for URIs in playlists (default:true
)m3u8.features.tagColors
: List of tag colors in format"TAG,borderColor,backgroundColor"
(default:[]
)m3u8.features.defaultColors
: Default colors for odd/even segments when no tag colors match (see below)m3u8.features.showTagDocumentation
: Show documentation tooltips for HLS tags (default:true
)
The m3u8.features.defaultColors
setting allows you to customize the colors used for alternating segments when no tag colors match. The default values are:
{
"odd": {
"backgroundColor": "rgba(25, 35, 50, 0.35)",
"borderColor": "rgba(50, 120, 220, 0.8)"
},
"even": {
"backgroundColor": "rgba(40, 55, 75, 0.25)",
"borderColor": "rgba(100, 160, 255, 0.6)"
}
}
The extension provides the following commands:
M3U8 / HLS: Open Remote Playlist
: Open a remote M3U8 playlist by entering its URLM3U8 / HLS: Refresh Current Playlist
: Manually refresh the current remote playlistM3U8 / HLS: Toggle Auto-Refresh
: Enable or disable automatic refreshing of the current remote playlist (not available for multi-variant playlists)M3U8 / HLS: Parse SCTE-35 Payload
: Parse a SCTE-35 payload and display the results in a new tab
The extension includes example files in the examples
directory demonstrating some of the features.
Found a bug or have a feature request? Please open an issue on GitHub.
This extension is licensed under the MIT License.