fix: preserve muted preference when replay starts after video end (#82) - #83
Conversation
🦋 Changeset detectedLatest commit: 37c3b51 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR introduces a muted state preservation mechanism across the YouTube bridge packages to fix an issue where video mute preferences are lost when replay starts after video playback ends. The fix tracks the desired muted state and reapplies it during ENDED-to-PLAYING state transitions in both the core controller and React Native implementations. Changes
Sequence DiagramsequenceDiagram
participant User
participant YouTubeAPI as YouTube API
participant StateHandler as State Handler
participant Controller as Player Controller
User->>YouTubeAPI: Video plays, user mutes (muted=true)
YouTubeAPI->>StateHandler: onStateChange(ENDED)
StateHandler->>Controller: syncDesiredMutedState()
Controller->>Controller: Read actual mute state from API
User->>YouTubeAPI: Click replay button
YouTubeAPI->>StateHandler: onStateChange(PLAYING)
StateHandler->>Controller: applyDesiredMutedState()
Controller->>YouTubeAPI: Reapply mute to player
YouTubeAPI->>User: Video resumes with mute preserved
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying react-native-youtube-bridge-example with
|
| Latest commit: |
37c3b51
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4156720d.react-native-youtube-bridge-example.pages.dev |
| Branch Preview URL: | https://fix-preserve-muted-state-on.react-native-youtube-bridge-example.pages.dev |
fix: #82
Summary by CodeRabbit
Bug Fixes
Improvements