HLS - HTTP Live Streaming

What is HLS?

HLS, or HTTP Live Streaming, is a media streaming protocol developed by Apple. It delivers audio and video content over the internet using standard HTTP. HLS works by breaking the stream into small chunks (segments) and delivering them sequentially to the client. It supports adaptive bitrate streaming, allowing playback to adjust based on network conditions.

Why is HLS Useful?

  • Adapts video quality dynamically to match network speed.

  • Reduces buffering and improves playback reliability.

  • Works over standard HTTP/CDN infrastructure.

  • Compatible with Apple devices and widely supported across platforms.

  • Supports encryption and DRM for secure content delivery.

How it works?

  • Video is segmented – Content is encoded at multiple bitrates and split into small .ts or .fmp4 segments.

  • Client requests a playlist – The m3u8 playlist file lists available segments and quality levels.

  • Client downloads segments – Based on current bandwidth, the client fetches the best-quality segment.

  • Playback adapts – The client monitors network conditions and adjusts quality levels as needed.

Where is HLS used?

  • Streaming platforms – Apple TV+, Hulu, and others.

  • Live broadcasts – Sports, concerts, and news events.

  • Mobile apps – Especially on iOS and macOS devices.

  • Education and training – For scalable video communications.

  • Enterprise solutions – Secure internal video communications.

Which OSI layer does this protocol belong to?

  • Uses HTTP for communication, which is an application-layer protocol.

  • Implements adaptive logic for streaming based on client-side decisions.

  • In this section, you are going to learn

  • Terminology

  • Version Info

sno

HLS Version

RFC / Standard

Core / Contribution

Year

1

HLS (Initial Draft)

draft-pantos-http-live-streaming

Apple Inc. (Pantos, et al.)

2009

2

HLS (1st Edition)

RFC 8216

IETF, Apple Inc.

2017

3

HLS (2nd Edition - Draft)

draft-pantos-hls-rfc8216bis

IETF, Apple Inc., HLS Community

2023

4

LL-HLS (Low-Latency HLS)

Apple Preliminary Specification

Apple Inc.

2019

5

HLS with Content Steering

draft-pantos-hls-content-steering

IETF, Apple Inc.

2023

  • Setup

  • Setup

HLS Playlist Request Packet

S.No

Protocol Packets

Description

Size(Bytes)

1

Playlist Request Packet

Client requests the master or media playlist (M3U8 file).

300800

HTTP Method

Typically a GET request

Variable

URL

URI of the playlist

Variable

Headers

Includes User-Agent, Accept, etc.

Variable

Query Parameters

Optional parameters like tokens

Variable

HLS Playlist Response Packet

S.No

Protocol Packets

Description

Size(Bytes)

2

Playlist Response Packet

Server responds with M3U8 playlist containing media segment URIs.

5002000

HTTP Status Code

Usually 200 OK

3

Headers

Content-Type, Cache-Control, etc.

Variable

Playlist Content

M3U8 content with tags like #EXTM3U, #EXTINF, URIs

5002000

HLS Media segment Request Packet

S.No

Protocol Packets

Description

Size(Bytes)

3

Media Segment Request Packet

Client requests a specific media segment (e.g., .ts or .m4s file).

300800

HTTP Method

GET request

Variable

Segment URI

URL of the media segment

Variable

Headers

May include Range, Authorization, etc.

Variable

HLS Media segment Response Packet

S.No

Protocol Packets

Description

Size(Bytes)

4

Media Segment Response Packet

Server responds with the media segment data.

50002000000

HTTP Status Code

200 OK

3

Headers

Content-Type, Content-Length, etc.

Variable

Media Data

MPEG-TS or fragmented MP4 binary data

5,0002,000,000

HLS Key Request Packet

S.No

Protocol Packets

Description

Size(Bytes)

5

Key Request Packet (Optional)

Client requests encryption key for encrypted segments.

300800

HTTP Method

GET request

Variable

Key URI

URL specified in #EXT-X-KEY tag

Variable

Headers

May include Authorization, etc.

Variable

HLS Key Response Packet

S.No

Protocol Packets

Description

Size(Bytes)

6

Key Response Packet

erver responds with the encryption key.

161024

HTTP Status Code

200 OK

3

Headers

Content-Type, Content-Length, etc.

Variable

Key Data

AES key used for decrypting segments

161024

HLS Playlist Reload Request Packet

S.No

Protocol Packets

Description

Size(Bytes)

7

Playlist Reload Request Packet

Client re-requests playlist to check for new segments (live streaming).

300800

HTTP Method

GET request

Variable

Playlist URI

Same as original playlist

Variable

Headers

May include If-Modified-Since, etc.

Variable

HLS Playlist Reload Response Packet

S.No

Protocol Packets

Description

Size(Bytes)

8

Playlist Reload Response Packet

Server responds with updated playlist including new segments.

5002000

HTTP Status Code

200 OK or 304 Not Modified

3

Headers

Content-Type, Cache-Control, etc.

Variable

Updated Playlist

New #EXTINF entries and segment URIs

5002000

sno

Use Case

Description

1

Live Event Streaming

HLS is widely used to stream live events such as sports, concerts, and news broadcasts. It supports adaptive bitrate streaming, ensuring smooth playback even with fluctuating network conditions.

2

Video on Demand (VoD)

HLS is ideal for delivering pre-recorded content like movies, TV shows, and educational videos. It allows users to start playback at any point and supports features like seeking and trick play.

3

e-Learning Platforms

Educational platforms use HLS to deliver lectures, tutorials, and interactive content. Its compatibility with multiple devices and browsers makes it suitable for remote learning.

4

Corporate Communications

Enterprises use HLS for internal communications, such as town halls, training sessions, and webinars, ensuring secure and scalable video delivery.

5

OTT Streaming Services

Over-the-top (OTT) platforms like Hulu and Disney+ use HLS to deliver content to a wide range of devices, including smart TVs, mobile phones, and desktops.

6

Surveillance and Security

HLS is used in IP camera systems to stream live video feeds to monitoring stations or mobile apps, often with low-latency configurations.

7

News Broadcasting

News agencies use HLS to deliver breaking news and live updates to viewers across the globe, with support for ad insertion and content steering.

8

Fitness and Wellness Apps

Apps offering live or recorded workout sessions use HLS to stream content to users, often with DRM and subscription-based access.

9

Religious Services

Churches, mosques, and temples use HLS to stream sermons and religious events to remote congregants.

10

Gaming and eSports

HLS is used to stream live gameplay and tournaments, often integrated with chat and interactive overlays for audience engagement.

sno

Feature

Description

1

Adaptive Bitrate Streaming

Automatically adjusts video quality based on the viewers network conditions.

2

Segmented Media Delivery

Breaks video into small chunks (e.g., 210 seconds) for efficient streaming.

3

Playlist Files (M3U8)

Uses .m3u8 files to list available media segments and their metadata.

4

HTTP-Based Delivery

Uses standard HTTP servers and CDNs, making it scalable and firewall-friendly.

5

Cross-Platform Support

Compatible with iOS, Android, browsers, smart TVs, and more.

6

Encryption Support

Supports AES-128 and SAMPLE-AES for secure content delivery.

7

Live and On-Demand Support

Can stream both live broadcasts and pre-recorded content.

8

Trick Play Support

Enables features like fast-forward, rewind, and seeking.

9

Closed Captions & Subtitles

Supports WebVTT and other formats for accessibility.

10

Low-Latency Mode

Offers Low-Latency HLS (LL-HLS) for near real-time streaming.

11

Ad Insertion

Supports server-side and client-side ad insertion using SCTE-35 markers.

12

Content Steering

Allows dynamic switching between CDNs or content sources.

Adaptive Bitrate Streaming - Testcases

S.No

Test Case

Description

Expected Result

1

Load Master Playlist

Load HLS master playlist

Playlist loads successfully

2

Parse Variant Streams

Parse all variant streams in master playlist

All variants are listed

3

Select Initial Bitrate

Player selects initial bitrate

Default or estimated bitrate is selected

4

Switch to Higher Bitrate

Network improves during playback

Player switches to higher bitrate

5

Switch to Lower Bitrate

Network degrades during playback

Player switches to lower bitrate

6

Maintain Bitrate Stability

Network remains stable

Bitrate remains unchanged

7

Handle Bitrate Oscillation

Network fluctuates rapidly

Player avoids frequent switching

8

Buffer-Based Switching

Switch based on buffer level

Bitrate adapts to buffer size

9

Bandwidth-Based Switching

Switch based on bandwidth estimate

Bitrate adapts to available bandwidth

10

Latency-Based Switching

Switch based on latency

Bitrate adapts to reduce latency

11

Manual Bitrate Selection

User selects bitrate manually

Selected bitrate is used

12

Disable ABR

User disables ABR

Bitrate remains fixed

13

Re-enable ABR

User re-enables ABR

Bitrate adapts again

14

Low Bandwidth Start

Start playback on slow network

Low bitrate stream is selected

15

High Bandwidth Start

Start playback on fast network

High bitrate stream is selected

16

Mid-Playback Network Drop

Network drops during playback

Player switches to lower bitrate

17

Mid-Playback Network Recovery

Network recovers during playback

Player switches to higher bitrate

18

Segment Download Failure

Segment fails to download

Player retries or switches bitrate

19

Segment Download Timeout

Segment download times out

Player switches to lower bitrate

20

Segment Download Retry

Retry failed segment

Segment is downloaded successfully

21

CDN Failover

Primary CDN fails

Player switches to backup CDN

22

Variant Playlist Load

Load variant playlist

Playlist loads successfully

23

Variant Playlist Error

Variant playlist is malformed

Error is handled gracefully

24

Segment Duration Consistency

Check segment durations

Durations are consistent

25

Segment Alignment

Check segment alignment across variants

Segments are aligned

26

Audio Sync Across Bitrates

Switch bitrate mid-playback

Audio remains in sync

27

Video Quality Verification

Switch to higher bitrate

Video quality improves

28

Buffer Underrun Recovery

Buffer underrun occurs

Player recovers with lower bitrate

29

Buffer Overrun Handling

Buffer exceeds limit

Excess segments are discarded

30

ABR on Mobile Network

Test on 4G/5G

Bitrate adapts to mobile conditions

31

ABR on Wi-Fi

Test on stable Wi-Fi

High bitrate is maintained

32

ABR on Ethernet

Test on wired connection

Highest bitrate is selected

33

ABR with VPN

Test with VPN enabled

Bitrate adapts to VPN speed

34

ABR with Proxy

Test with proxy server

Bitrate adapts correctly

35

ABR with Packet Loss

Simulate packet loss

Player switches to lower bitrate

36

ABR with High Latency

Simulate high latency

Bitrate is reduced

37

ABR with Jitter

Simulate jitter

Player maintains stable bitrate

38

ABR with Throttled Bandwidth

Throttle bandwidth mid-playback

Bitrate is reduced

39

ABR with Bandwidth Spike

Sudden bandwidth increase

Bitrate is increased

40

ABR with Multiple Audio Tracks

Switch bitrate with multiple audio tracks

Audio remains consistent

41

ABR with Subtitles

Switch bitrate with subtitles enabled

Subtitles remain synced

42

ABR with Encrypted Streams

Switch bitrate with DRM

Playback continues securely

43

ABR with Live Stream

Test ABR on live HLS stream

Bitrate adapts in real-time

44

ABR with VOD Stream

Test ABR on VOD HLS stream

Bitrate adapts based on conditions

45

ABR with Trick Play

Use trick play (seek, pause)

Bitrate adapts after resume

46

ABR with Seek Operation

Seek to different timestamp

Bitrate adapts after seek

47

ABR with Playlist Reload

Reload master playlist

Bitrate selection is preserved

48

ABR with Playlist Update

Master playlist is updated

New variants are considered

49

ABR with Player Restart

Restart player mid-stream

Bitrate is re-evaluated

50

ABR Performance Logging

Log bitrate changes

Logs show correct switching behavior

Segmented Media Delivery - Testcases

S.No

Test Case

Description

Expected Result

1

Load Master Playlist

Load the HLS master playlist

Playlist loads successfully

2

Load Media Playlist

Load a variant media playlist

Playlist loads successfully

3

Parse Segment URIs

Extract segment URIs from playlist

All segment URLs are parsed

4

Download First Segment

Download the first media segment

Segment is downloaded successfully

5

Download Last Segment

Download the last segment in playlist

Segment is downloaded successfully

6

Segment Sequence Order

Verify segment sequence numbers

Segments are in correct order

7

Segment Duration Accuracy

Check segment durations match playlist

Durations are accurate

8

Segment Timestamp Accuracy

Verify timestamps in segments

Timestamps are aligned

9

Segment Alignment

Check alignment across variants

Segments are aligned

10

Segment Format Validation

Validate segment file format (e.g., .ts, .m4s)

Format is correct

11

Segment MIME Type

Check MIME type of segment

MIME type is correct

12

Segment Size Limit

Verify segment size is within limits

Size is acceptable

13

Segment Download Time

Measure time to download segment

Time is within expected range

14

Segment Download Retry

Retry failed segment download

Retry succeeds

15

Segment Download Timeout

Simulate timeout

Timeout is handled gracefully

16

Segment Download Over HTTP

Download segment over HTTP

Segment is delivered

17

Segment Download Over HTTPS

Download segment over HTTPS

Segment is delivered securely

18

Segment Caching

Enable caching for segments

Segments are cached

19

Segment No-Cache

Disable caching

Segments are fetched fresh

20

Segment Prefetching

Prefetch upcoming segments

Playback is smoother

21

Segment Expiry Handling

Request expired segment

Server returns 404

22

Segment Encryption

Use encrypted segments

Segments decrypt and play

23

Segment Decryption Failure

Use wrong key

Playback fails securely

24

Segment Key Rotation

Rotate encryption keys

Playback continues without issue

25

Segment with Discontinuity

Handle discontinuity tag in playlist

Playback resumes correctly

26

Segment with Byte Range

Use byte-range addressing

Partial segment is delivered

27

Segment with EXT-X-MAP

Use initialization segment

Init segment is loaded

28

Segment with EXT-X-PREFETCH

Use prefetch hint

Segment is prefetched

29

Segment with EXT-X-DISCONTINUITY

Handle discontinuity in stream

Playback continues smoothly

30

Segment with EXT-X-GAP

Handle missing segment

Player skips or retries

31

Segment with EXT-X-BYTERANGE

Use byte range for segment

Segment is partially downloaded

32

Segment with EXT-X-KEY

Use encryption key tag

Key is fetched and used

33

Segment with EXT-X-ENDLIST

Handle end of playlist

Playback stops gracefully

34

Segment with EXT-X-START

Start playback at offset

Playback begins at specified point

35

Segment with EXT-X-PROGRAM-DATE-TIME

Use program date/time

Timeline is synchronized

36

Segment with EXT-X-DATERANGE

Handle date range metadata

Metadata is parsed

37

Segment with EXT-X-ALLOW-CACHE

Respect cache directive

Caching behavior is correct

38

Segment with EXT-X-TARGETDURATION

Match segment durations

Segments are within target duration

39

Segment with EXT-X-MEDIA-SEQUENCE

Start from correct sequence

Playback starts at correct point

40

Segment with EXT-X-VERSION

Use correct HLS version

Features are supported

41

Segment with EXT-X-PLAYLIST-TYPE

Handle VOD or EVENT type

Playback behavior matches type

42

Segment with EXT-X-RENDITION-REPORT

Use rendition report for LL-HLS

Playback stays near live edge

43

Segment with EXT-X-SERVER-CONTROL

Use server control attributes

Player respects hold-back and part-hold-back

44

Segment with EXT-X-PART

Handle partial segments

Playback is low-latency

45

Segment with EXT-X-SKIP

Skip segments using skip tag

Skipped segments are not downloaded

46

Segment with EXT-X-PRELOAD-HINT

Use preload hint for next part

Segment is preloaded

47

Segment with EXT-X-SESSION-DATA

Parse session data

Metadata is available

48

Segment with EXT-X-SESSION-KEY

Use session key for encryption

Key is applied correctly

49

Segment with EXT-X-INDEPENDENT-SEGMENTS

Handle independent segments

Playback is seamless

50

Segment with EXT-X-DEFINE

Use variable definitions

Variables are resolved correctly

Playlist Files(M3U8) - Testcases

S.No

Test Case

Description

Expected Result

1

Load Master Playlist

Load a master .m3u8 file

Playlist loads successfully

2

Load Media Playlist

Load a media .m3u8 file

Playlist loads successfully

3

Parse EXT-X-STREAM-INF

Parse variant stream info

All variants are listed

4

Parse EXTINF Tags

Parse media segment durations

Durations are accurate

5

Parse EXT-X-ENDLIST

Detect end of playlist

Playback ends gracefully

6

Parse EXT-X-TARGETDURATION

Read target duration

Segment durations match target

7

Parse EXT-X-MEDIA-SEQUENCE

Read sequence number

Playback starts at correct segment

8

Parse EXT-X-VERSION

Read playlist version

Features match version

9

Parse EXT-X-KEY

Read encryption key info

Key is fetched and used

10

Parse EXT-X-MAP

Read initialization segment info

Init segment is loaded

11

Parse EXT-X-DISCONTINUITY

Handle stream discontinuity

Playback continues smoothly

12

Parse EXT-X-PROGRAM-DATE-TIME

Read timestamp metadata

Timeline is synchronized

13

Parse EXT-X-ALLOW-CACHE

Read cache directive

Caching behavior is correct

14

Parse EXT-X-PLAYLIST-TYPE

Detect VOD or EVENT type

Playback behavior matches type

15

Parse EXT-X-START

Read start offset

Playback begins at specified point

16

Parse EXT-X-I-FRAMES-ONLY

Detect I-frame only playlist

I-frame segments are used

17

Parse EXT-X-BYTERANGE

Read byte range info

Partial segment is downloaded

18

Parse EXT-X-DATERANGE

Read date range metadata

Metadata is parsed correctly

19

Parse EXT-X-SESSION-DATA

Read session-level metadata

Data is available to player

20

Parse EXT-X-SESSION-KEY

Read session-level encryption key

Key is applied correctly

21

Parse EXT-X-DEFINE

Read variable definitions

Variables are resolved

22

Parse EXT-X-INDEPENDENT-SEGMENTS

Detect independent segments

Playback is seamless

23

Parse EXT-X-PREFETCH

Read prefetch hints

Segment is prefetched

24

Parse EXT-X-GAP

Detect missing segments

Player skips or retries

25

Parse EXT-X-SKIP

Skip segments using skip tag

Skipped segments are not downloaded

26

Parse EXT-X-PART

Handle partial segments

Playback is low-latency

27

Parse EXT-X-PRELOAD-HINT

Use preload hint for next part

Segment is preloaded

28

Parse EXT-X-RENDITION-REPORT

Use rendition report for LL-HLS

Playback stays near live edge

29

Parse EXT-X-SERVER-CONTROL

Read server control attributes

Player respects hold-back settings

30

Validate Playlist Syntax

Check for correct M3U8 syntax

Playlist passes validation

31

Handle Malformed Playlist

Load playlist with syntax errors

Error is logged or fallback occurs

32

Playlist Encoding Format

Check UTF-8 encoding

Encoding is correct

33

Playlist File Size

Check playlist file size

Size is within limits

34

Playlist Download Over HTTP

Download playlist via HTTP

Playlist is delivered

35

Playlist Download Over HTTPS

Download playlist via HTTPS

Playlist is delivered securely

36

Playlist Caching

Enable caching for playlist

Playlist is cached

37

Playlist No-Cache

Disable caching

Playlist is fetched fresh

38

Playlist Update Interval

Check update frequency for live

Updates occur as expected

39

Playlist Reload After Expiry

Reload expired playlist

New playlist is fetched

40

Playlist with Multiple Audio Tracks

Include multiple audio renditions

Audio switching is supported

41

Playlist with Subtitles

Include subtitle tracks

Subtitles render correctly

42

Playlist with DRM

Include DRM info

Playback is secure

43

Playlist with Ads

Include ad segments

Ads play correctly

44

Playlist with Trick Play

Include trick play segments

Trick modes function correctly

45

Playlist with I-frame Playlist

Include I-frame only playlist

Fast seeking is supported

46

Playlist with Low-Latency Tags

Include LL-HLS tags

Playback is near real-time

47

Playlist with CDN URLs

Use CDN-based segment URLs

Segments are delivered via CDN

48

Playlist with Relative URLs

Use relative segment paths

URLs resolve correctly

49

Playlist with Absolute URLs

Use absolute segment paths

URLs resolve correctly

50

Playlist with Comments

Include comments in playlist

Comments are ignored by parser

HTTP-Based Delivery - Testcases

S.No

Test Case

Description

Expected Result

1

Load Playlist via HTTP

Request .m3u8 file over HTTP

Playlist loads successfully

2

Load Playlist via HTTPS

Request .m3u8 file over HTTPS

Playlist loads securely

3

Invalid Playlist URL

Use incorrect URL

HTTP 404 or error returned

4

Segment Download via HTTP

Request .ts or .m4s segment

Segment is delivered

5

Segment Download via HTTPS

Request segment over HTTPS

Segment is delivered securely

6

Segment Range Request

Use HTTP Range header

Partial content is returned

7

Segment Invalid Range

Use invalid byte range

HTTP 416 error is returned

8

Playlist Caching Enabled

Enable caching headers

Playlist is cached

9

Playlist Caching Disabled

Disable caching

Playlist is fetched fresh

10

Segment Caching Enabled

Enable segment caching

Segment is served from cache

11

Segment Caching Disabled

Disable segment caching

Segment is fetched from origin

12

CDN Segment Delivery

Deliver segment via CDN

Segment is delivered from edge node

13

Segment with Expired Token

Use expired access token

HTTP 403 Forbidden

14

Segment with Valid Token

Use valid access token

Segment is delivered

15

Playlist with Redirection

Redirect to another URL

Redirection is followed

16

Segment with Redirection

Segment URL redirects

Segment is delivered

17

Playlist with Gzip Compression

Enable gzip

Playlist is decompressed and parsed

18

Segment with Gzip Compression

Enable gzip for segments

Segment is decompressed

19

Playlist with Chunked Transfer

Use chunked encoding

Playlist is streamed in chunks

20

Segment with Chunked Transfer

Use chunked encoding

Segment is streamed in chunks

21

Playlist with Keep-Alive

Use keep-alive connection

Connection is reused

22

Playlist with Connection Close

Use connection: close

New connection is opened

23

Segment with Keep-Alive

Segment requests reuse connection

Connection is reused

24

Segment with Connection Close

Segment request closes connection

New connection is opened

25

Playlist with ETag

Use ETag for validation

304 Not Modified if unchanged

26

Segment with ETag

Use ETag for segment

304 Not Modified if unchanged

27

Playlist with If-Modified-Since

Use last modified header

304 Not Modified if unchanged

28

Segment with If-Modified-Since

Use last modified header

304 Not Modified if unchanged

29

Playlist with Proxy

Request via HTTP proxy

Playlist is delivered

30

Segment with Proxy

Request segment via proxy

Segment is delivered

31

Playlist with Authentication

Use basic auth

Playlist is delivered

32

Segment with Authentication

Use basic auth

Segment is delivered

33

Playlist with Invalid Auth

Use wrong credentials

HTTP 401 Unauthorized

34

Segment with Invalid Auth

Use wrong credentials

HTTP 401 Unauthorized

35

Playlist with SSL Error

Use invalid SSL cert

Connection is rejected

36

Segment with SSL Error

Use invalid SSL cert

Connection is rejected

37

Playlist with IPv6

Request over IPv6

Playlist is delivered

38

Segment with IPv6

Segment request over IPv6

Segment is delivered

39

Playlist with IPv4

Request over IPv4

Playlist is delivered

40

Segment with IPv4

Segment request over IPv4

Segment is delivered

41

Playlist with DNS Failure

Simulate DNS error

Playlist fails to load

42

Segment with DNS Failure

Simulate DNS error

Segment fails to load

43

Playlist with High Latency

Simulate network delay

Playlist loads with delay

44

Segment with High Latency

Simulate delay

Segment loads with delay

45

Playlist with Packet Loss

Simulate packet loss

Playlist retries or fails

46

Segment with Packet Loss

Simulate packet loss

Segment retries or fails

47

Playlist with Throttled Bandwidth

Limit bandwidth

Playlist loads slowly

48

Segment with Throttled Bandwidth

Limit bandwidth

Segment loads slowly

49

Playlist with Load Balancer

Use load-balanced URL

Playlist is routed correctly

50

Segment with Load Balancer

Use load-balanced segment URL

Segment is routed correctly

Cross Platform Support - Testcases

S.No

Test Case

Description

Expected Result

1

Playback on Windows (Chrome)

Play HLS stream on Chrome browser

Stream plays successfully

2

Playback on Windows (Edge)

Play HLS stream on Edge browser

Stream plays successfully

3

Playback on Windows (Firefox)

Play HLS stream on Firefox browser

Stream plays with plugin or fallback

4

Playback on macOS (Safari)

Play HLS stream on Safari

Native HLS playback works

5

Playback on macOS (Chrome)

Play HLS stream on Chrome

Stream plays successfully

6

Playback on macOS (Firefox)

Play HLS stream on Firefox

Stream plays with plugin or fallback

7

Playback on iOS (Safari)

Play HLS stream on Safari

Native HLS playback works

8

Playback on iOS (Chrome)

Play HLS stream on Chrome

Stream plays using system player

9

Playback on iOS (App)

Play HLS stream in native app

Stream plays using AVPlayer

10

Playback on Android (Chrome)

Play HLS stream on Chrome

Stream plays successfully

11

Playback on Android (Firefox)

Play HLS stream on Firefox

Stream plays with plugin or fallback

12

Playback on Android (App)

Play HLS stream in native app

Stream plays using ExoPlayer

13

Playback on Linux (Chrome)

Play HLS stream on Chrome

Stream plays successfully

14

Playback on Linux (Firefox)

Play HLS stream on Firefox

Stream plays with plugin or fallback

15

Playback on Smart TV (Tizen)

Play HLS stream on Samsung Smart TV

Stream plays using native player

16

Playback on Smart TV (WebOS)

Play HLS stream on LG Smart TV

Stream plays using native player

17

Playback on Roku

Play HLS stream on Roku device

Stream plays using Roku player

18

Playback on Fire TV

Play HLS stream on Amazon Fire TV

Stream plays using native app

19

Playback on Chromecast

Cast HLS stream to Chromecast

Stream plays on TV

20

Playback on Apple TV

Play HLS stream on Apple TV

Stream plays using native player

21

Playback on Xbox

Play HLS stream on Xbox browser

Stream plays successfully

22

Playback on PlayStation

Play HLS stream on PlayStation browser

Stream plays successfully

23

Playback on Web Browser

Play HLS stream in any modern browser

Stream plays with or without plugin

24

Playback in React Native App

Play HLS stream in React Native

Stream plays using supported player

25

Playback in Flutter App

Play HLS stream in Flutter

Stream plays using plugin

26

Playback in Unity App

Play HLS stream in Unity

Stream plays using video plugin

27

Playback in Electron App

Play HLS stream in Electron

Stream plays using embedded browser

28

Playback in Progressive Web App

Play HLS stream in PWA

Stream plays successfully

29

Playback in Native Windows App

Play HLS stream in UWP app

Stream plays using MediaElement

30

Playback in Native macOS App

Play HLS stream in macOS app

Stream plays using AVPlayer

31

Playback in Native Android App

Play HLS stream in Android app

Stream plays using ExoPlayer

32

Playback in Native iOS App

Play HLS stream in iOS app

Stream plays using AVPlayer

33

Playback in WebView (Android)

Play HLS stream in WebView

Stream plays successfully

34

Playback in WebView (iOS)

Play HLS stream in WebView

Stream plays using system player

35

Playback in Embedded Browser

Play HLS stream in embedded browser

Stream plays successfully

36

Playback with DRM on Android

Play encrypted HLS stream

DRM is supported and playback works

37

Playback with DRM on iOS

Play encrypted HLS stream

DRM is supported and playback works

38

Playback with Subtitles

Play HLS stream with subtitles

Subtitles render correctly

39

Playback with Multiple Audio Tracks

Switch audio tracks during playback

Audio switches successfully

40

Playback with Adaptive Bitrate

Network changes during playback

Bitrate adapts smoothly

41

Playback with Low Latency

Play LL-HLS stream

Playback is near real-time

42

Playback with Seek Support

Seek to different timestamp

Seek works across platforms

43

Playback with Pause/Resume

Pause and resume playback

Playback resumes correctly

44

Playback with Rewind

Rewind stream

Playback rewinds correctly

45

Playback with Fast Forward

Fast forward stream

Playback skips ahead correctly

46

Playback with Buffering

Simulate slow network

Playback buffers and resumes

47

Playback with Offline Mode

Try playback without internet

Playback fails gracefully

48

Playback with Playlist Reload

Reload updated playlist

Playback continues seamlessly

49

Playback with Segment Retry

Retry failed segment download

Playback resumes after retry

50

Playback with Analytics

Track playback metrics

Metrics are logged across platforms

Encryption Support - Testcases

S.No

Test Case

Description

Expected Result

1

Load Encrypted Playlist

Load .m3u8 with EXT-X-KEY tag

Playlist loads successfully

2

Load Unencrypted Playlist

Load .m3u8 without encryption

Playlist loads normally

3

AES-128 Encryption Support

Use AES-128 encryption

Segments decrypt and play

4

SAMPLE-AES Encryption Support

Use SAMPLE-AES encryption

Segments decrypt and play

5

Invalid Key URI

Use incorrect key URI

Decryption fails gracefully

6

Valid Key URI

Use correct key URI

Key is fetched successfully

7

Key Rotation

Use multiple keys in playlist

Player switches keys correctly

8

Key Fetch Over HTTP

Fetch key over HTTP

Key is retrieved

9

Key Fetch Over HTTPS

Fetch key over HTTPS

Key is securely retrieved

10

Key Fetch with Authentication

Fetch key with auth headers

Key is retrieved with credentials

11

Key Fetch with Expired Token

Use expired token

Key fetch fails with 403

12

Key Fetch with Valid Token

Use valid token

Key fetch succeeds

13

Key Fetch Timeout

Simulate timeout

Retry or error is triggered

14

Key Fetch Retry

Retry failed key fetch

Key is eventually retrieved

15

Key Caching Enabled

Enable key caching

Key is reused from cache

16

Key Caching Disabled

Disable key caching

Key is fetched each time

17

Segment Decryption Success

Decrypt segment with correct key

Segment plays successfully

18

Segment Decryption Failure

Use wrong key

Playback fails securely

19

Segment with IV Specified

Use EXT-X-KEY with IV

Segment decrypts correctly

20

Segment with No IV

Use EXT-X-KEY without IV

Default IV is used

21

Segment with Reused Key

Use same key for multiple segments

Playback is smooth

22

Segment with Unique Key

Use different key per segment

Keys rotate correctly

23

Playlist with Mixed Encryption

Mix encrypted and unencrypted segments

Player handles both types

24

Playlist with DRM Info

Include DRM metadata

DRM is recognized

25

Playlist with Invalid EXT-X-KEY

Malformed EXT-X-KEY tag

Playlist fails to parse

26

Playlist with Multiple EXT-X-KEY Tags

Use multiple key declarations

Player handles key changes

27

Playlist with EXT-X-SESSION-KEY

Use session-level key

Key is applied globally

28

Playlist with EXT-X-SESSION-KEY and EXT-X-KEY

Use both session and segment keys

Segment key overrides session key

29

Playlist with SAMPLE-AES and AAC

Use SAMPLE-AES with AAC audio

Audio decrypts and plays

30

Playlist with SAMPLE-AES and AVC

Use SAMPLE-AES with AVC video

Video decrypts and plays

31

Playlist with AES-128 and MPEG-TS

Use AES-128 with MPEG-TS

Segments decrypt and play

32

Playlist with AES-128 and fMP4

Use AES-128 with fragmented MP4

Segments decrypt and play

33

Playlist with Key URI Redirection

Key URI redirects to another URL

Redirection is followed

34

Playlist with Key URI Failure

Key URI returns 404

Decryption fails gracefully

35

Playlist with Key URI Overload

Simulate server overload

Retry or fallback occurs

36

Playlist with Key URI on CDN

Fetch key from CDN

Key is delivered from edge

37

Playlist with Key URI on Origin

Fetch key from origin server

Key is delivered successfully

38

Playlist with Key URI on Proxy

Fetch key via proxy

Key is delivered

39

Playlist with Key URI on VPN

Fetch key over VPN

Key is delivered securely

40

Playlist with Key URI on IPv6

Fetch key over IPv6

Key is delivered

41

Playlist with Key URI on IPv4

Fetch key over IPv4

Key is delivered

42

Playlist with Key URI using Basic Auth

Use basic authentication

Key is fetched

43

Playlist with Key URI using Bearer Token

Use bearer token

Key is fetched

44

Playlist with Key URI using OAuth

Use OAuth token

Key is fetched

45

Playlist with Key URI using Expired Cert

Use expired SSL cert

Connection is rejected

46

Playlist with Key URI using Valid Cert

Use valid SSL cert

Key is fetched securely

47

Playlist with Key URI using Self-Signed Cert

Use self-signed cert

Warning or rejection occurs

48

Playlist with Key URI using TLS 1.2

Use TLS 1.2

Key is fetched securely

49

Playlist with Key URI using TLS 1.3

Use TLS 1.3

Key is fetched securely

50

Playlist with Key URI using HTTP/2

Fetch key over HTTP/2

Key is delivered successfully

Live and On-Demand Support - Testcases

S.No

Test Case

Description

Expected Result

1

Start Live Stream

Initiate a live HLS stream

Stream starts broadcasting

2

Start On-Demand Stream

Start an on-demand HLS stream

VOD stream begins playback

3

Load Live Playlist

Load .m3u8 for live stream

Playlist loads successfully

4

Load VOD Playlist

Load .m3u8 for on-demand stream

Playlist loads successfully

5

Live Playlist Updates

Check for playlist refresh

Playlist updates with new segments

6

VOD Playlist Static

Verify VOD playlist is static

Playlist does not change

7

Live Segment Availability

Check segment availability in live

New segments appear over time

8

VOD Segment Availability

Check segment availability in VOD

All segments are available

9

Seek in VOD

Seek to a timestamp in VOD

Playback jumps to correct point

10

Seek in Live

Attempt to seek in live stream

Seek is limited or disabled

11

Pause VOD Playback

Pause on-demand stream

Playback pauses

12

Pause Live Playback

Pause live stream

Playback pauses at current point

13

Resume VOD Playback

Resume paused VOD

Playback resumes from paused point

14

Resume Live Playback

Resume paused live stream

Playback resumes at live edge

15

Buffering in Live

Simulate network drop in live

Buffering occurs and recovers

16

Buffering in VOD

Simulate network drop in VOD

Buffering occurs and recovers

17

Adaptive Bitrate in Live

Change network speed during live

Bitrate adjusts dynamically

18

Adaptive Bitrate in VOD

Change network speed during VOD

Bitrate adjusts dynamically

19

End Live Stream

Stop live stream from server

Playback ends gracefully

20

End VOD Stream

Reach end of VOD content

Playback stops at end

21

Live Stream with EXT-X-PROGRAM-DATE-TIME

Use timestamps in live playlist

Timestamps are parsed correctly

22

VOD Stream with EXT-X-ENDLIST

Use endlist tag in VOD

Player recognizes end of stream

23

Live Stream with EXT-X-DISCONTINUITY

Insert discontinuity in live

Playback handles transition

24

VOD Stream with EXT-X-DISCONTINUITY

Insert discontinuity in VOD

Playback handles transition

25

Live Stream with EXT-X-MEDIA-SEQUENCE

Verify sequence number increments

Sequence increases with new segments

26

VOD Stream with EXT-X-MEDIA-SEQUENCE

Verify static sequence number

Sequence remains constant

27

Live Stream with EXT-X-TARGETDURATION

Check target duration accuracy

Segments match target duration

28

VOD Stream with EXT-X-TARGETDURATION

Check target duration accuracy

Segments match target duration

29

Live Stream with EXT-X-KEY

Use encryption in live

Segments decrypt and play

30

VOD Stream with EXT-X-KEY

Use encryption in VOD

Segments decrypt and play

31

Live Stream with EXT-X-PART

Use partial segments

Low-latency playback works

32

VOD Stream with EXT-X-PART

Use partial segments

Playback is smooth

33

Live Stream with EXT-X-SERVER-CONTROL

Use server control tags

Player respects hold-back settings

34

VOD Stream with EXT-X-START

Use start offset

Playback begins at offset

35

Live Stream with EXT-X-RENDITION-REPORT

Use rendition report

Player stays near live edge

36

VOD Stream with Multiple Audio Tracks

Switch audio during playback

Audio switches successfully

37

Live Stream with Multiple Audio Tracks

Switch audio during live

Audio switches successfully

38

VOD Stream with Subtitles

Enable subtitles

Subtitles display correctly

39

Live Stream with Subtitles

Enable subtitles

Subtitles display correctly

40

Live Stream with EXT-X-GAP

Handle missing segments

Player skips or retries

41

VOD Stream with EXT-X-GAP

Handle missing segments

Player skips or retries

42

Live Stream with EXT-X-DATERANGE

Use metadata in live

Metadata is parsed

43

VOD Stream with EXT-X-DATERANGE

Use metadata in VOD

Metadata is parsed

44

Live Stream with EXT-X-PRELOAD-HINT

Use preload hint

Segment is preloaded

45

VOD Stream with EXT-X-PRELOAD-HINT

Use preload hint

Segment is preloaded

46

Live Stream with EXT-X-SKIP

Use skip tag

Player skips segments

47

VOD Stream with EXT-X-SKIP

Use skip tag

Player skips segments

48

Live Stream with EXT-X-DEFINE

Use variable definitions

Variables are resolved

49

VOD Stream with EXT-X-DEFINE

Use variable definitions

Variables are resolved

50

Live and VOD Compatibility

Use same player for both types

Player handles both modes correctly

Trick Play Support - Testcases

S.No

Test Case

Description

Expected Result

1

Load Trick Play Playlist

Load .m3u8 with I-frame only playlist

Playlist loads successfully

2

Parse EXT-X-I-FRAME-ONLY

Detect I-frame only playlist tag

Player recognizes trick play mode

3

Fast Forward 2x

User fast-forwards at 2x speed

Playback skips I-frames smoothly

4

Fast Forward 4x

User fast-forwards at 4x speed

Playback skips I-frames faster

5

Fast Forward 8x

User fast-forwards at 8x speed

Playback skips I-frames rapidly

6

Rewind 2x

User rewinds at 2x speed

Playback reverses using I-frames

7

Rewind 4x

User rewinds at 4x speed

Playback reverses faster

8

Rewind 8x

User rewinds at 8x speed

Playback reverses rapidly

9

Pause During Trick Play

Pause during fast-forward or rewind

Playback pauses at current I-frame

10

Resume After Pause

Resume playback after pause

Playback resumes from paused I-frame

11

Seek to Specific Time

Seek to a timestamp

Player jumps to nearest I-frame

12

Trick Play with Audio Disabled

Audio is muted during trick play

No audio is played

13

Trick Play with Audio Enabled

Audio is incorrectly enabled

Audio is not played (expected)

14

Trick Play with Subtitles

Subtitles are shown during trick play

Subtitles are hidden or disabled

15

Trick Play with Multiple Bitrates

Switch bitrate during trick play

I-frame playlist switches correctly

16

Trick Play with Encrypted Segments

Use AES-128 encrypted I-frame playlist

Segments decrypt and play

17

Trick Play with SAMPLE-AES

Use SAMPLE-AES encryption

Trick play functions correctly

18

Trick Play with EXT-X-KEY

Use EXT-X-KEY in I-frame playlist

Key is fetched and used

19

Trick Play with EXT-X-MAP

Use EXT-X-MAP for init segment

Init segment is loaded correctly

20

Trick Play with EXT-X-BYTERANGE

Use byte-range addressing

Segments are partially downloaded

21

Trick Play with EXT-X-START

Start playback at offset

Trick play starts at correct point

22

Trick Play with EXT-X-ENDLIST

End of playlist is reached

Playback stops at last I-frame

23

Trick Play with EXT-X-TARGETDURATION

Validate segment duration

Duration matches target

24

Trick Play with EXT-X-MEDIA-SEQUENCE

Validate sequence numbers

Sequence is consistent

25

Trick Play with EXT-X-VERSION

Use version 4+ for I-frame support

Playlist is parsed correctly

26

Trick Play with EXT-X-DISCONTINUITY

Handle discontinuity

Playback skips over correctly

27

Trick Play with EXT-X-PROGRAM-DATE-TIME

Use timestamps

Time-based seeking works

28

Trick Play with EXT-X-DATERANGE

Use metadata

Metadata is ignored or parsed

29

Trick Play with EXT-X-DEFINE

Use variable definitions

Variables are resolved

30

Trick Play with EXT-X-SESSION-KEY

Use session-level key

Key is applied globally

31

Trick Play with EXT-X-SESSION-DATA

Use session metadata

Metadata is parsed

32

Trick Play with EXT-X-ALLOW-CACHE

Enable caching

Segments are cached

33

Trick Play with EXT-X-PLAYLIST-TYPE

Use VOD or EVENT type

Playback behavior matches type

34

Trick Play with EXT-X-INDEPENDENT-SEGMENTS

Use independent segments

Playback is seamless

35

Trick Play with EXT-X-GAP

Handle missing I-frame segments

Player skips or retries

36

Trick Play with EXT-X-PREFETCH

Use prefetch hints

Segments are preloaded

37

Trick Play with EXT-X-PART

Use partial segments

Trick play skips parts correctly

38

Trick Play with EXT-X-SKIP

Use skip tag

Player skips segments

39

Trick Play with EXT-X-PRELOAD-HINT

Use preload hint

Segment is preloaded

40

Trick Play with EXT-X-RENDITION-REPORT

Use rendition report

Playback stays near live edge

41

Trick Play on Mobile

Test on iOS/Android

Trick play works on mobile

42

Trick Play on Desktop

Test on Windows/macOS

Trick play works on desktop

43

Trick Play on Smart TV

Test on Smart TV browser

Trick play functions correctly

44

Trick Play on Web Browser

Test on Chrome/Safari/Edge

Trick play is supported

45

Trick Play in Native App

Test in iOS/Android app

Trick play is supported

46

Trick Play with CDN

Deliver I-frame playlist via CDN

Segments are delivered correctly

47

Trick Play with Slow Network

Simulate low bandwidth

Trick play adapts or buffers

48

Trick Play with High Latency

Simulate high latency

Playback remains responsive

49

Trick Play with Packet Loss

Simulate packet loss

Playback skips or retries

50

Trick Play with Analytics

Track trick play usage

Events are logged correctly

Closed Captions and Subtitles - Testcases

S.No

Test Case

Description

Expected Result

1

Load Playlist with Subtitles

Load .m3u8 with EXT-X-MEDIA for subtitles

Playlist loads and subtitles are listed

2

Load Playlist with Captions

Load .m3u8 with closed captions

Captions are detected

3

Display Subtitles in Player

Enable subtitles during playback

Subtitles appear on screen

4

Display Captions in Player

Enable closed captions

Captions appear on screen

5

Switch Subtitle Language

Switch between available subtitle tracks

Selected language is displayed

6

Switch Caption Language

Switch between caption tracks

Selected caption language is shown

7

Subtitle Track Auto-Select

Auto-select based on browser language

Correct subtitle is selected

8

Caption Track Auto-Select

Auto-select based on system settings

Correct caption is selected

9

Subtitle Track Missing

Reference non-existent subtitle track

Player shows fallback or error

10

Caption Track Missing

Reference non-existent caption track

Player shows fallback or error

11

Subtitle Format WebVTT

Use WebVTT subtitle format

Subtitles render correctly

12

Subtitle Format TTML

Use TTML subtitle format

Subtitles render correctly

13

Subtitle Format SRT

Use SRT subtitle format

Subtitles render correctly

14

Subtitle Format IMSC1

Use IMSC1 format

Subtitles render correctly

15

Subtitle Format Unsupported

Use unsupported format

Player shows error or ignores track

16

Subtitle File Over HTTP

Load subtitle file over HTTP

File loads successfully

17

Subtitle File Over HTTPS

Load subtitle file over HTTPS

File loads securely

18

Subtitle File with CORS

Load subtitle with CORS headers

File loads successfully

19

Subtitle File without CORS

Load subtitle without CORS

File fails to load

20

Subtitle File with Gzip

Load compressed subtitle file

File decompresses and loads

21

Subtitle File with Byte Range

Load subtitle using byte-range

Partial file loads correctly

22

Subtitle File with Encryption

Load encrypted subtitle file

File decrypts and displays

23

Subtitle File with Invalid URI

Use broken subtitle URL

File fails to load

24

Subtitle File with Redirection

Subtitle URL redirects

Redirection is followed

25

Subtitle File with Authentication

Load subtitle with auth headers

File loads with credentials

26

Subtitle File with Expired Token

Use expired token

File fails to load

27

Subtitle File with Valid Token

Use valid token

File loads successfully

28

Subtitle Sync with Audio

Ensure subtitle timing matches audio

Subtitles appear in sync

29

Subtitle Sync with Video

Ensure subtitle timing matches video

Subtitles appear in sync

30

Subtitle Delay Handling

Introduce delay in subtitle

Player adjusts or shows delay

31

Subtitle Offset Support

Use offset in subtitle track

Subtitles shift accordingly

32

Subtitle Styling Support

Use styling in WebVTT

Styles are rendered correctly

33

Subtitle Positioning

Use positioning cues

Subtitles appear in correct location

34

Subtitle Font Customization

Change font via player settings

Font updates correctly

35

Subtitle Size Customization

Change font size

Size updates correctly

36

Subtitle Color Customization

Change font color

Color updates correctly

37

Subtitle Background Customization

Change background color

Background updates correctly

38

Subtitle Toggle On/Off

Enable/disable subtitles

Subtitles appear/disappear

39

Caption Toggle On/Off

Enable/disable captions

Captions appear/disappear

40

Subtitle Track Reload

Reload subtitle track mid-playback

Track reloads without issue

41

Subtitle Track Switching

Switch between tracks mid-playback

Switch is seamless

42

Subtitle Track with EXT-X-MEDIA

Use EXT-X-MEDIA for subtitles

Track is listed and selectable

43

Caption Track with EXT-X-MEDIA

Use EXT-X-MEDIA for captions

Track is listed and selectable

44

Subtitle Track with DEFAULT=YES

Default subtitle is auto-enabled

Track is selected automatically

45

Subtitle Track with FORCED=YES

Forced subtitles always display

Track displays without user action

46

Subtitle Track with AUTOSELECT=YES

Auto-select based on locale

Track is selected automatically

47

Subtitle Track with LANGUAGE Attribute

Use LANGUAGE tag

Language is displayed in UI

48

Subtitle Track with NAME Attribute

Use NAME tag

Track name appears in player

49

Subtitle Track with GROUP-ID

Use GROUP-ID for multiple tracks

Tracks are grouped correctly

50

Subtitle Track with INSTREAM-ID

Use INSTREAM-ID for captions

Captions are mapped correctly

Ad Insertion - Testcases

S.No

Test Case

Description

Expected Result

1

Load Playlist with Ads

Load .m3u8 containing ad markers

Playlist loads successfully

2

Parse EXT-X-CUE-OUT

Detect start of ad break

Player prepares for ad insertion

3

Parse EXT-X-CUE-IN

Detect end of ad break

Player resumes content playback

4

Parse EXT-X-CUE-OUT-CONT

Handle mid-ad cue continuation

Player tracks ad duration

5

Ad Segment Availability

Check ad segments are available

Ad segments are fetched

6

Ad Segment Playback

Play ad segments

Ads play without error

7

Ad to Content Transition

Switch from ad to content

Seamless transition occurs

8

Content to Ad Transition

Switch from content to ad

Seamless transition occurs

9

Mid-roll Ad Insertion

Insert ad during content

Ad plays at correct timestamp

10

Pre-roll Ad Insertion

Insert ad before content

Ad plays before main content

11

Post-roll Ad Insertion

Insert ad after content

Ad plays after main content

12

Ad Skipping Disabled

Prevent skipping ads

Skip button is disabled

13

Ad Skipping Enabled

Allow skipping after delay

Skip button appears after timeout

14

Ad Clickthrough URL

Click on ad opens URL

Browser opens target link

15

Ad Impression Tracking

Track ad start

Impression is logged

16

Ad Completion Tracking

Track ad end

Completion is logged

17

Ad Quartile Tracking

Track 25%, 50%, 75%, 100%

Events are logged correctly

18

Ad Error Handling

Simulate ad load failure

Fallback or skip to content

19

Ad Buffering

Simulate slow network

Ad buffers and resumes

20

Ad with Subtitles

Play ad with subtitles

Subtitles display correctly

21

Ad with Multiple Audio Tracks

Switch audio during ad

Audio switches correctly

22

Ad with DRM

Play encrypted ad

Ad decrypts and plays

23

Ad with Different Resolution

Play ad with different resolution

Player adjusts display

24

Ad with Different Bitrate

Play ad with different bitrate

Player adapts bitrate

25

Ad with EXT-X-DISCONTINUITY

Handle discontinuity tag

Playback continues smoothly

26

Ad with EXT-X-DATERANGE

Use metadata for ad

Metadata is parsed

27

Ad with EXT-X-MAP

Use init segment for ad

Init segment is loaded

28

Ad with EXT-X-KEY

Use encryption key

Key is fetched and used

29

Ad with EXT-X-START

Start ad at offset

Playback begins at correct point

30

Ad with EXT-X-ENDLIST

End of ad playlist

Playback stops at end

31

Ad with EXT-X-TARGETDURATION

Validate segment duration

Segments match target

32

Ad with EXT-X-MEDIA-SEQUENCE

Validate sequence numbers

Sequence is consistent

33

Ad with EXT-X-VERSION

Use version 4+

Features are supported

34

Ad with EXT-X-ALLOW-CACHE

Enable caching

Ad segments are cached

35

Ad with EXT-X-BYTERANGE

Use byte-range addressing

Partial segment is fetched

36

Ad with EXT-X-PREFETCH

Prefetch ad segments

Playback is smoother

37

Ad with EXT-X-PART

Use partial segments

Low-latency ad playback

38

Ad with EXT-X-SKIP

Skip ad segments

Player skips as instructed

39

Ad with EXT-X-PRELOAD-HINT

Preload next ad part

Segment is preloaded

40

Ad with EXT-X-DEFINE

Use variable definitions

Variables are resolved

41

Ad with EXT-X-SESSION-KEY

Use session-level key

Key is applied globally

42

Ad with EXT-X-SESSION-DATA

Use session metadata

Metadata is parsed

43

Ad on Mobile Browser

Play ad on mobile

Ad plays correctly

44

Ad on Desktop Browser

Play ad on desktop

Ad plays correctly

45

Ad on Smart TV

Play ad on Smart TV

Ad plays correctly

46

Ad on Native App

Play ad in mobile app

Ad plays correctly

47

Ad with Analytics

Track ad metrics

Metrics are logged

48

Ad with Geo-Targeting

Serve ad based on location

Correct ad is delivered

49

Ad with Frequency Capping

Limit ad repetition

Same ad is not repeated

50

Ad with Companion Banner

Show banner with video ad

Banner displays alongside video

Low Latency Mode - Testcases

S.No

Test Case

Description

Expected Result

1

Enable Low-Latency Mode

Enable LL-HLS in player

Player switches to low-latency mode

2

Load LL-HLS Playlist

Load .m3u8 with LL-HLS tags

Playlist loads successfully

3

Parse EXT-X-PART

Parse partial segment tags

Player recognizes and uses parts

4

Parse EXT-X-SERVER-CONTROL

Parse server control attributes

Player respects hold-back values

5

Parse EXT-X-PRELOAD-HINT

Parse preload hint tag

Player preloads next part

6

Parse EXT-X-RENDITION-REPORT

Parse rendition report

Player stays near live edge

7

Use EXT-X-SKIP

Skip segments using skip tag

Player skips segments correctly

8

Use EXT-X-MAP

Load initialization segment

Init segment is fetched and used

9

Use EXT-X-PROGRAM-DATE-TIME

Sync with wall-clock time

Player aligns playback correctly

10

Use EXT-X-TARGETDURATION

Validate target duration

Segment durations match

11

Use EXT-X-PART-HOLD-BACK

Respect part hold-back

Player buffers accordingly

12

Use EXT-X-HOLD-BACK

Respect hold-back

Player buffers accordingly

13

Use EXT-X-START

Start playback at offset

Playback begins at correct point

14

Use EXT-X-VERSION 7+

Use version 7 or higher

LL-HLS features are supported

15

Segment Duration Accuracy

Validate segment durations

Durations match target

16

Part Duration Accuracy

Validate part durations

Durations match playlist

17

Segment Availability Timing

Check segment availability

Segments appear on time

18

Part Availability Timing

Check part availability

Parts appear on time

19

Segment Download Over HTTP/2

Use HTTP/2 for delivery

Segments stream efficiently

20

Segment Download Over HTTP/3

Use HTTP/3 for delivery

Segments stream efficiently

21

Segment Download with Chunked Transfer

Use chunked transfer encoding

Segments stream in real-time

22

Segment Download with Gzip

Use gzip compression

Segments decompress and play

23

Segment Download with Range Requests

Use byte-range requests

Partial segments are fetched

24

Segment Download with Retry

Retry failed segment

Segment is re-fetched

25

Segment Download with Timeout

Simulate timeout

Player retries or switches bitrate

26

Segment Download with CDN

Use CDN for delivery

Segments are delivered from edge

27

Segment Download with Token Auth

Use token-based access

Segments are fetched securely

28

Segment Download with Expired Token

Use expired token

Access is denied

29

Segment Download with Redirection

Handle HTTP 3xx

Redirection is followed

30

Segment Download with SSL

Use HTTPS

Secure connection is established

31

Segment Download with Invalid SSL

Use invalid cert

Connection is rejected

32

Segment Download with Proxy

Use HTTP proxy

Segments are delivered

33

Segment Download with VPN

Use VPN connection

Segments are delivered securely

34

Segment Download with Packet Loss

Simulate packet loss

Playback continues with retries

35

Segment Download with High Latency

Simulate network delay

Playback adjusts buffer

36

Segment Download with Jitter

Simulate jitter

Playback remains stable

37

Segment Download with Bandwidth Drop

Simulate bandwidth drop

Player switches to lower bitrate

38

Segment Download with Bandwidth Spike

Simulate bandwidth increase

Player switches to higher bitrate

39

Playback Drift Correction

Simulate clock drift

Player re-aligns to live edge

40

Playback Buffer Underrun

Simulate buffer underrun

Playback stalls and recovers

41

Playback Buffer Overrun

Simulate buffer overflow

Excess segments are discarded

42

Playback Latency Measurement

Measure end-to-end latency

Latency is within target (e.g., <5s)

43

Playback with Adaptive Bitrate

Enable ABR

Bitrate switches smoothly

44

Playback with Subtitles

Enable subtitles

Subtitles remain in sync

45

Playback with Audio Switching

Switch audio tracks

Audio switches without delay

46

Playback with Trick Play Disabled

Attempt trick play

Trick play is disabled in LL mode

47

Playback with Analytics

Track latency and buffer metrics

Metrics are logged correctly

48

Playback on Mobile

Test LL-HLS on mobile browser

Playback is smooth and low-latency

49

Playback on Desktop

Test LL-HLS on desktop browser

Playback is smooth and low-latency

50

Playback on Smart TV

Test LL-HLS on Smart TV

Playback is supported and low-latency

Content Steering - Testcases

S.No

Test Case

Description

Expected Result

1

Load Master Playlist with Steering

Load .m3u8 containing EXT-X-CONTENT-STEERING

Playlist loads successfully

2

Parse EXT-X-CONTENT-STEERING

Parse content steering tag

Steering URI is extracted

3

Fetch Steering Manifest

Request steering manifest from URI

Manifest is retrieved

4

Invalid Steering URI

Use incorrect URI

Error or fallback occurs

5

Steering Manifest Format

Validate JSON format of manifest

Manifest is parsed correctly

6

Steering Manifest with Multiple Variants

Manifest lists multiple variants

Player selects appropriate variant

7

Steering Manifest with Single Variant

Manifest lists one variant

Player uses listed variant

8

Steering Manifest with Empty List

Manifest has no variants

Player uses default variant

9

Steering Manifest with Priority

Manifest includes priority values

Player selects highest priority variant

10

Steering Manifest with Weight

Manifest includes weight values

Player selects based on weight

11

Steering Manifest with Geo Targeting

Manifest includes geo rules

Player selects variant based on location

12

Steering Manifest with Device Targeting

Manifest includes device rules

Player selects variant based on device

13

Steering Manifest with Network Targeting

Manifest includes network rules

Player selects variant based on bandwidth

14

Steering Manifest with Language Targeting

Manifest includes language rules

Player selects variant based on locale

15

Steering Manifest with Time-Based Rules

Manifest includes time rules

Variant changes based on time

16

Steering Manifest with AB Testing

Manifest includes A/B test groups

Player selects variant based on group

17

Steering Manifest with Fallback Variant

Manifest includes fallback

Player uses fallback if others fail

18

Steering Manifest with Invalid JSON

Manifest is malformed

Player logs error and uses default

19

Steering Manifest with HTTPS

Manifest is served over HTTPS

Secure connection is established

20

Steering Manifest with HTTP

Manifest is served over HTTP

Manifest is retrieved

21

Steering Manifest with Authentication

Manifest requires auth

Auth headers are sent correctly

22

Steering Manifest with Expired Token

Token is expired

Manifest fetch fails

23

Steering Manifest with Valid Token

Token is valid

Manifest fetch succeeds

24

Steering Manifest with Redirection

URI redirects to another URL

Redirection is followed

25

Steering Manifest with CORS

Manifest served with CORS headers

Manifest loads successfully

26

Steering Manifest without CORS

Manifest served without CORS

Manifest fails to load in browser

27

Steering Manifest with Retry

Retry on failed fetch

Manifest is eventually retrieved

28

Steering Manifest with Timeout

Simulate timeout

Player uses default variant

29

Steering Manifest with CDN Variants

Variants point to different CDNs

Player selects optimal CDN

30

Steering Manifest with Bitrate Variants

Variants have different bitrates

Player selects based on bandwidth

31

Steering Manifest with Resolution Variants

Variants have different resolutions

Player selects based on screen size

32

Steering Manifest with Language Variants

Variants have different languages

Player selects based on locale

33

Steering Manifest with Audio Variants

Variants have different audio tracks

Player selects preferred audio

34

Steering Manifest with Subtitle Variants

Variants have different subtitle tracks

Player selects preferred subtitle

35

Steering Manifest with Device Type Rules

Manifest targets mobile/desktop

Player selects accordingly

36

Steering Manifest with OS Rules

Manifest targets OS type

Player selects accordingly

37

Steering Manifest with Browser Rules

Manifest targets browser type

Player selects accordingly

38

Steering Manifest with User-Agent Rules

Manifest uses UA string

Player matches and selects variant

39

Steering Manifest with Region Rules

Manifest targets region

Player selects based on IP location

40

Steering Manifest with ISP Rules

Manifest targets ISP

Player selects based on network provider

41

Steering Manifest with Custom Headers

Manifest requires custom headers

Headers are sent correctly

42

Steering Manifest with Analytics

Log variant selection

Analytics are recorded

43

Steering Manifest with Logging

Log manifest fetch and parse

Logs are generated correctly

44

Steering Manifest with Error Handling

Handle fetch or parse errors

Player uses default variant

45

Steering Manifest with Update Interval

Manifest updates periodically

Player fetches new manifest

46

Steering Manifest with Cache Control

Manifest includes cache headers

Player respects caching rules

47

Steering Manifest with Session Persistence

Maintain variant across session

Same variant used throughout session

48

Steering Manifest with Playback Resume

Resume playback with same variant

Playback resumes correctly

49

Steering Manifest with ABR Integration

Integrate with adaptive bitrate

Steering complements ABR decisions

50

Steering Manifest with Multi-CDN Failover

Failover between CDNs

Playback continues without interruption

  • Reference links