Skip to content

Conversation

sheep-q
Copy link
Contributor

@sheep-q sheep-q commented Aug 28, 2025

🔗 Issue Links

N/A

🎯 Goal

  • In StreamVideoPlayer, the AVPlayer adjusts the URL multiple times unnecessarily, causing it to reset its state when navigating back.
  • AVPlayer continues playing video and audio when swiping to another item.

📝 Summary

  • AVPlayer should fetch the URL once on appear.
  • AVPlayer should stop when swiping to other item.

🛠 Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

Explain how this change can be tested manually, if applicable.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@sheep-q sheep-q requested a review from a team as a code owner August 28, 2025 09:25
…when swiping to another item in the gallery.
@sheep-q sheep-q force-pushed the fix/video_player_onAppear_onDisappear branch from c75aeca to 3274993 Compare August 28, 2025 09:26
}
}
.onAppear {
guard avPlayer == nil else { return }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It use to resume playback, therefore we should keep the same behaviour.

if let avPlayer {
                avPlayer.play()
                return
            }

@sheep-q sheep-q requested a review from laevandus August 29, 2025 10:50
Copy link
Contributor

@laevandus laevandus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified it manually and ran CI checks separately

@laevandus laevandus merged commit f25b9ec into GetStream:develop Aug 29, 2025
5 of 9 checks passed
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants