-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Arabic subtitles alignment #2194
Comments
We'd definitely like to make sure RTL captions work properly :). Please could you provide some sample media so that we can investigate the issue? It would be helpful if you could provide some information about a particular point in the video where the issue occurs, and the expected output at that position (similar to the example you provide above). This will help us verify a fix. |
Yes, sure. The mentioned caption was at line 4317 The correct formatting should be as shown in the second screenshot |
This can likely be solved using Android's |
@MurtadhaS |
Hello! Many years passed and this problem seems not fixed yet. I tested in exoplayer 2.14.2, the Arabic comma "،" , should stay at left, but appears at right. At the same time, the Arabic question mark "؟" appears at the correct place. Example subtitle text: If I use the webview by As mentioned above, how does |
That's great that the webview works well for this - but sorry to hear about your styling issues. I've dug down in more detail below, but I think we should continue further discussion on WebView styling in separate issues in order to keep this one focussed on the alignment problem in the canvas-based subtitle output.
I can reproduce this in 2.17.1 (screenshots below), using the "TTML positioning" sample and the following patch to the demo app in playerView.getSubtitleView().setViewType(SubtitleView.VIEW_TYPE_WEB);
playerView.getSubtitleView().setStyle(new CaptionStyleCompat(
/* foregroundColor= */ Color.RED,
/* backgroundColor= */ Color.GREEN,
/* windowColor= */ Color.CYAN,
CaptionStyleCompat.EDGE_TYPE_OUTLINE,
/* edgeColor= */ Color.BLACK,
/* typeface= */ null
)); I've filed #10137 to track this specifically (so that we can keep this issue focussed on the alignment problems).
I wasn't able to reproduce this using the dropshadow version of the patch above. The WebView and Canvas based outputs do look different, but I think the WebView output actually more closely reflects the sample shown in the Android system caption style settings window. Please can you file a new bug with clear repro steps (can be based on the demo app) and screenshots showing what you see (similar to what I've included here). |
I lose focus when using subView.setViewType(SubtitleView.VIEW_TYPE_WEB). |
@sajjadshahbazi Please file a new issue in https://github.com/androidx/media with full details and repro instructions, and we can take a look. |
As shown in the screenshot from ExoPlayer 2.0.4,

In Arabic (RTL), the dashes ("-") and the parenthesis, should start from the same direction as the Arabic language,

i.e., from the right to the left, as shown below.
Can you provide a solution to fix this? or is it already being fixed?
Thanks a lot :)
The text was updated successfully, but these errors were encountered: