SvenTiigi/YouTubePlayerKit

Slow loading videos on macOS

mikem011 opened this issue · 4 comments

YouTubePlayerKit Environment

  • YouTubePlayerKit version: 1.1.12
  • macOS version: 12.6.1
  • Xcode version: 14.0.1
  • Dependency manager (SPM, Manually): SPM

What did you do?

ℹ I have a project with two targets, one for iOS and for for macOS. The app lists a grid of thumbnails for the videos. Tapping on a thumbnail will open another view and play the video. When building and running the iOS target videos load very quickly and play. When building the target for macOS and tapping on the thumbnail it takes on average 25 seconds for the videos to load and play.

What did you expect to happen?

ℹ I expect the iOS behavior of loading videos to be the same on macOS.

What happened instead?

ℹ Videos on macOS take substantially longer to load and play.

Hi @mikem011,

Please check out the develop branch and let me know if the issue still exists.

Hi @SvenTiigi,

The issue still exists and a new issue is now present as well. When I dismiss the view that the video is playing in the audio continues to play. I have to quit the app in order for the audio to stop playing.

The develop branch has been updated which now contains an additional check if the view has been removed from the window to automatically stops the playback. Additionally, you could make sure that the YouTubePlayer also gets correctly deallocated when closing or dimissing the view.

Fixed with version 1.3.0