Skip to content

Fix iOS player view controller containment#4908

Open
sorinc03 wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
sorinc03:fix/ios-show-controls-when-paused
Open

Fix iOS player view controller containment#4908
sorinc03 wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
sorinc03:fix/ios-show-controls-when-paused

Conversation

@sorinc03
Copy link
Copy Markdown

Summary

  • Call didMove(toParent:) after embedding the iOS AVPlayerViewController for native controls.
  • Pair controller removals with willMove(toParent: nil) before detaching/removing the controller.
  • Backports the proper containment lifecycle pattern already used on the v7/master implementation to the 6.x support branch.

Fixes #3138

Test Plan

  • git diff --check
  • xcodebuild -list -project ios/RCTVideo.xcodeproj
  • xcodebuild -project ios/RCTVideo.xcodeproj -scheme RCTVideo -configuration Debug -sdk iphonesimulator CODE_SIGNING_ALLOWED=NO build (fails in this standalone clone because React and generated bridge headers are unavailable: unable to resolve module dependency: React and RCTVideoSwiftLog.h file not found)

Notes

This keeps the change scoped to UIKit containment lifecycle. AVPlayerViewController relies on being correctly added as a child view controller, and the 6.x branch was missing the didMove(toParent:) call after addChild.

@Duya3fithou
Copy link
Copy Markdown

Thanks for your contribution. Is it possible to support Video v7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

2 participants