Skip to content

Fixes bug where poster and video was displayed simultaneously#1627

Merged
CHaNGeTe merged 8 commits intoTheWidlarzGroup:release/4.4.2from
jensellfors:posterfix
Jun 22, 2019
Merged

Fixes bug where poster and video was displayed simultaneously#1627
CHaNGeTe merged 8 commits intoTheWidlarzGroup:release/4.4.2from
jensellfors:posterfix

Conversation

@jensellfors
Copy link
Contributor

@jensellfors jensellfors commented Jun 19, 2019

When using poster image and not using absolute positioning of the Video element you end up with both video and poster elements. This was introduced in #1167. My fix to revert some changes but keep the benefits of no flashing.

This fix relies on onReadyForDisplay callback to hide the poster. It's been tested on iOS and ExoPlayer. I added it to DOM as well but haven't been able to test...

Fixes 1509

@jensellfors jensellfors requested review from CHaNGeTe and cobarx June 19, 2019 09:56
@jensellfors
Copy link
Contributor Author

@CHaNGeTe I'm happy with this one now, but need help testing. Especially on android and the ExoPlayer. We need to verify that onReadyForDisplay is called for all platforms, otherwise the poster won't be removed. What do you guys think of this solution?

@CHaNGeTe CHaNGeTe requested a review from n1ru4l June 20, 2019 05:32
@CHaNGeTe CHaNGeTe changed the base branch from master to release/4.4.2 June 20, 2019 05:34
@jensellfors
Copy link
Contributor Author

@CHaNGeTe I just pushed a commit that hides the poster in onLoad as onReadyForDisplay is not implemented. (A good example why maintaining several platforms is hard ;p)

Copy link
Contributor

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

Legit!

@CHaNGeTe CHaNGeTe merged commit 3a7be63 into TheWidlarzGroup:release/4.4.2 Jun 22, 2019
beauner69 pushed a commit to beauner69/react-native-video that referenced this pull request Oct 10, 2019
Fixes bug where poster and video was displayed simultaneously

(rebased from commit 3a7be63)
@IamMasterWayne
Copy link

"react-native": "0.61.5"
"react-native-video": "^5.0.2"

React Native Android Black Screen For Android

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.

4 participants