Skip to content

Commit

Permalink
Fixed error on Android Nougat
Browse files Browse the repository at this point in the history
  • Loading branch information
bebbe committed Aug 10, 2017
1 parent 833df3e commit 84ce1a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const styles = StyleSheet.create({
playArrow: {
color: 'white',
},
video: {
video: Platform.Version === 25 ? {} : {
backgroundColor: 'black',
},
controls: {
Expand Down

12 comments on commit 84ce1a9

@ShariqMush
Copy link

@ShariqMush ShariqMush commented on 84ce1a9 Aug 10, 2017

Choose a reason for hiding this comment

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

Best fix ever🔥

@cornedor
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the pull request. Quick question, what happens without this fix?

@ShariqMush
Copy link

Choose a reason for hiding this comment

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

@cornedor You are not able to run your app with this library on Android 7.0 Nougat

@sebastianpantin
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, didnt know it made a pull request. But it fixes the error on android nougat. The video player crashes when it tries to set the background color on higher android versions

@sebastianpantin
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably something wrong in the react native video library but it was easier to fix here

@cornedor
Copy link
Collaborator

Choose a reason for hiding this comment

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

@sebastianalbert it is not related to the fullscreen code right?

@sebastianpantin
Copy link
Contributor

Choose a reason for hiding this comment

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

No, its not!

@sebastianpantin
Copy link
Contributor

Choose a reason for hiding this comment

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

The crash happens when you press the play Button in version 25 with a set backgroundcolor, but this fixes that

@cornedor
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok cool, I'll cherry pick it onto master then. And also keep an eye on TheWidlarzGroup/react-native-video#649

@sebastianpantin
Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good!

@cornedor
Copy link
Collaborator

Choose a reason for hiding this comment

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

Its published, could you check if it works?

@sebastianpantin
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems to work! Thanks :)

Please sign in to comment.