Post

Replies

Boosts

Views

Activity

Memory leak with UISheetPresentationController
Hello, It appears that there is a memory leak when utilizing a UISheetPresentationController. Please take a look at this simple project available here. On the iOS 16.4 simulator for iPhone 14, if I dismiss the sheet, SheetViewController is successfully deinitialized. However, when I run this code on a real device (iPhone XR, iOS 16.4.1), the deinit of SheetViewController is not triggered. It seems like the presentation controller which holds a reference to SheetViewController stays in memory, captured by a closure. Here is the memory leak caused by iOS: Is this bug already known to the community? Should I report it? Is there any workaround for this issue? Thank you.
2
3
1.1k
May ’23
What is the correct way to detect EXT-X-ENDLIST tag from a HLS Playlist with AVPlayer ?
Hi, I would like to know what is the recommended way to detect the end of a live HLS playlist (sliding window) which contains the EXT-X-ENDLIST end tag ? I tried to do this: Observing the currentItem's duration property. It often works, but sometimes currentItem's duration remains indefinite even if EXT-X-ENDLIST hls end tag was appended to the playlist. To me: if duration.isIndefinite, we're LIVE if duration.isValid && !duration.isIndefinite, it's VOD Observe playbackType from AVPlayerItem's last accessLogEvent with AVPlayerItemNewAccessLogEntryNotification. It seems the most reliable and work 100% of the time, but accessLog is never refreshed when playing a live playlist and is refreshed only after seeking. I would prefer a more reactive way to know when a live has ended... Playlist example where currentItem's duration remains indefinite event if end tag is present (iPhone XR, iOS 14.4.1): swift #EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:8 #EXT-X-MEDIA-SEQUENCE:302 #EXT-X-PROGRAM-DATE-TIME:2021-05-20T13:30:32.000Z #EXT-X-KEY:METHOD=AES-128,URI="https://example.akamaized.net/serve.key" #EXTINF:8.00000, remote_00302.ts #EXT-X-PROGRAM-DATE-TIME:2021-05-20T13:30:40.000Z #EXTINF:8.00000, remote_00303.ts ... #EXT-X-PROGRAM-DATE-TIME:2021-05-20T14:00:08.000Z #EXTINF:8.00000, remote_00524.ts #EXT-X-PROGRAM-DATE-TIME:2021-05-20T14:00:16.000Z #EXTINF:8.00000, remote_00525.ts #EXT-X-PROGRAM-DATE-TIME:2021-05-20T14:00:24.000Z #EXTINF:5.13333, remote_00526.ts #EXT-X-ENDLIST Should i file a bug for this ? Or i'm doing it in the wrong way ? Thank you for your help, Paul.
3
0
3.2k
May ’21