Insert the segment dynamically in the middle on EVENT playlist / The way to instead of EXT-X-GAP

I want to insert the segment dynamically in the middle of the playlist. For example, if the segment is not stored in the storage.

First, the playlist response below:

#EXTM3U
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:5.005000,
0.ts
#EXTINF:5.005000,
1.ts
#EXT-X-DISCONTINUITY
#EXT-X-MEDIA-SEQUENCE:5
#EXTINF:5.005000,
5.ts
#EXTINF:5.005000,
6.ts


Next, the playlist response below:

#EXTM3U
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:5.005000,
0.ts
#EXTINF:5.005000,
1.ts
#EXTINF:5.005000,
2.ts
#EXTINF:5.005000,
3.ts
#EXTINF:5.005000,
4.ts
#EXTINF:5.005000,
5.ts
#EXTINF:5.005000,
6.ts


AVPlayer will be output the MEDIA_PLAYBACK_STALL when got the above playlist.

EXT-X-GAP will fulfill that method, but it was only support < iOS 11.


What another way can I resolve this?