shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
239 stars 62 forks source link

The video freezes during a scroll #135

Closed okycelt closed 4 years ago

okycelt commented 4 years ago

Issue description

In portrait mode, we have a similar layout like YouTube. In the upper part of the screen, there is a ShakaPlayerView filling the whole width while having an aspect ratio of 16:9. Below, the rest of the screen is taken by a UICollectionView. Whenever we interact with the UICollectionView (i.e. the contentOffset is changing), the video freezes while the audio keeps playing. Once the UICollectionView stops scrolling, the video unfreezes.

A similar situation happens when we modally present a UITableViewController with modalPresentationStyle = .pageSheet over the player view controller. If there is no user interaction, we can see that the content is playing normally underneath. But when we start scrolling or pulling to dismiss, the video freezes until the view controller is dismissed.

It seems that the playback continues normally, but the frames in ShakaPlayerView are not updated during a scroll.

Reproduction steps

  1. Start playback
  2. Modally present a UITableViewController with modalPresentationStyle = .pageSheet
  3. Scroll the UITableView or pull to dismiss the view controller
  4. The video should freeze when scrolling

Version of Shaka Player Embedded

6b8337553f045005d5d6908725c680de84d62f9e (at this moment latest master)

Device(s) and version(s) of iOS being used

iPhone XR with iOS 13.4.1