AirPlay stuck on buffering state

We are facing a weird behaviour when implementing the AirPlay functionality of our iOS app.

When we test our app on Apple TV devices everything works fine. On some smart TVs with a specific AirPlay receiver version, (more details below) the stream gets stuck on buffering state immediately after switching to AirPlay mode. On other smart TVs, with different AirPlay receiver version, everything works as expected.

The interesting part is that other free or DRM protected streams, work fine on all devices.


Smart TVs that AirPlay works fine

AirPlay Version -> 25.06 (19.9.9)


Smart TVs that AirPlay stuck at buffering state:

AirPlayReceiverSDKVersion -> 3.3.0.54

AirPlayReceiverAppVersion -> 53.122.0


You can reproduce this issue using the following stream url:

https://tr.vod.cdn.cosmotetvott.gr/v1/310/668/1674288197219/1674288197219.ism/.m3u8?qual=a&ios=1&hdnts=st=1713194669~exp=1713237899~acl=*/310/668/1674288197219/1674288197219.ism/*~id=cab757e3-9922-48a5-988b-3a4f5da368b6~data=de9bbd0100a8926c0311b7dbe5389f7d91e94a199d73b6dc75ea46a4579769d7~hmac=77b648539b8f3a823a7d398d69e5dc7060632c29

If this link expires, notify me to send a new one for testing.


Could you please provide to us any specific suggestion as to what causes this issue on those specific streams?

After some tests we determined that the issue is related to the segment duration.

Specifically the old playlist manifest looks like this:

#EXTM3U
#EXT-X-VERSION:5
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:2
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://...",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:1.92, no desc
segment-1.ts
#EXTINF:1.92, no desc
segment-2.ts
#EXTINF:1.92, no desc
segment-3.ts

and the test streams that work on all AirPlay receiver versions, look like this:

#EXTM3U
#EXT-X-VERSION:5
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://...",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:3.84, no desc
segment-1.ts
#EXTINF:3.84, no desc
segment-2.ts
#EXTINF:3.84, no desc
segment-3.ts

To the best of my knowledge, a segment duration of 2 or less shouldn't be a problem. Is this correct?

Is this an issue of the specific version of the AirPlay receiver?

Is there any workaround besides changing all our streams to have segment duration of 4?

New stream url that reproduces the issue:

https://tr.vod.cdn.cosmotetvott.gr/v1/871/504/1755406917024/1755406917024.ism/.m3u8?qual=a&ios=1&hdnts=st=1716389374~exp=1716432604~acl=*/871/504/1755406917024/1755406917024.ism/*~id=01f67f47-805e-4a41-be29-e14cc9a86830~data=de9bbd0100a8926c0311b7dbe5389f7d91e94a199d73b6dc75ea46a4579769d7~hmac=be120d41a0be6c07bd8e4531d41a489153fedb56

Updated stream url:

https://tr.vod.cdn.cosmotetvott.gr/v1/871/504/1755406917024/1755406917024.ism/.m3u8?qual=a&ios=1&hdnts=st=1716553550~exp=1716596780~acl=*/871/504/1755406917024/1755406917024.ism/*~id=cf1bbd7c-8288-436c-91f9-60d686d182a3~data=de9bbd0100a8926c0311b7dbe5389f7d91e94a199d73b6dc75ea46a4579769d7~hmac=8fdb478fee2c14d5de4c379251cccb05fd061265
AirPlay stuck on buffering state
 
 
Q