Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disallow rtl behaviour #222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix: disallow rtl behaviour #222

wants to merge 2 commits into from

Conversation

YogiHa
Copy link

@YogiHa YogiHa commented Jun 24, 2021

Hey, and thanks for this great package :)

Added a fix for opposite looking and behavior for RTL users.
Currently it mandatory (as a Hebrew native speaker, never saw an opposite video player), in case it should be optional it can be added by adding a disallowRtl prop and calculating accords.
(The downside of prop controlled method that it will be achieved by either declaring styles as a function or by taking this optional styles outside StyleSheet.create, therefore I did it currently mandatory)

Tell me if anything else needed,
Yogi

@azharkhan1
Copy link

Hello @YogiHa , I tried running this code and the player is still showing reverted in changed language other than english, any suggestions?

@YogiHa
Copy link
Author

YogiHa commented Dec 8, 2021

Did you restart the application after change the rtl status?

Copy link

@mahamaad mahamaad left a comment

Choose a reason for hiding this comment

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

Hey @YogiHa thank you for solution but this pr have some issue

1-please delete ',' in the end of line 1251

2-this change good in android but has an issue in iOS you need add Platform.OS === 'android' to your conditions like this:
in line 1251 I18nManager.isRTL ? 'row-reverse' : 'row' change to I18nManager.isRTL && Platform.OS === 'android' ? 'row-reverse' : 'row'
also change it in line 1424
...(I18nManager.isRTL ? { transform: [{ rotateY: '180deg' }] } : {}) change to ...(I18nManager.isRTL && Platform.OS === 'android' ? { transform: [{ rotateY: '180deg' }] } : {})

@YogiHa
Copy link
Author

YogiHa commented May 28, 2022

@mahamaad
I'm using my current fix for both android and iOS platforms and never encountered an issue with it on iOS
Which version of RN did the issue happened? And which xcode version?

@mahamaad
Copy link

@YogiHa sorry u right my view had direction:'ltr' i delete it and work fine, only issue in line 1251 just delete ',' and work good,

thank you.

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.

3 participants