[iOS 16, AVPlayer, AirPlay] Base URL is not updated if URL was redirected

If the HLS playlist source URL returns a 301 (moved permanently) HTTP code, the AVPlayer doesn't update the URL after exiting the AirPlay.

Example: http://example.com/old/playlist.m3u8 > 301 to http://example.com/new/something.m3u8

Everything works fine until we tap the Apple TV in the AirPlay options and then tap the iPhone in order to exit the AirPlay.

The player should query: http://example.com/old/playlist.m3u8 > 301 to http://example.com/new/something.m3u8

The player is querying: http://example.com/old/something.m3u8 Which returns a Bad Request.

Problem occurs on the iOS 16 beta 5, on the iOS 15 everything works as expected.

If the behavior is different from one release to the next, please file a report using the feedback assistant (and mention the FB number here).

[iOS 16, AVPlayer, AirPlay] Base URL is not updated if URL was redirected
 
 
Q