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

bad position some character (... , !) in farsi subtitle #11214

Open
sajjadshahbazi opened this issue Jun 18, 2023 · 7 comments
Open

bad position some character (... , !) in farsi subtitle #11214

sajjadshahbazi opened this issue Jun 18, 2023 · 7 comments
Assignees

Comments

@sajjadshahbazi
Copy link

sajjadshahbazi commented Jun 18, 2023

Bug

I want to show Farsi subtitles, but some characters show at the beginning of the sentences. While the main sentence, those are at the end of the sentences.
characters for example are: ! - ,

there is a similar issue: #2194
I set subView.setViewType(SubtitleView.VIEW_TYPE_WEB) for player view (I didn't use separated subtitleview, I handled subtitles in the main player) the problem was resolved. but when I use subView.setViewType(SubtitleView.VIEW_TYPE_WEB) lose focus on android tv.
Apparently, the subtitle view takes focus when using subView.setViewType(SubtitleView.VIEW_TYPE_WEB).

I used BidiFormatter for testing, but I can't add some requirement parameters (language, id, and ...) and I can't test that.

@sajjadshahbazi sajjadshahbazi changed the title bad position some farsi character (... , !) in subtitle bad position some character (... , !) in farsi subtitle Jun 18, 2023
@sajjadshahbazi
Copy link
Author

but other characters(?) are correct position. so the problem is not related to alignment and right-to-left direction.

@marcbaechinger
Copy link
Contributor

Can you provide us with some test media, so we can test with this?

@sajjadshahbazi
Copy link
Author

sajjadshahbazi commented Jun 19, 2023

            "domain": "https://mssub.namava.ir",
            "relativePath": "/files/76cdc6f8-4444-4687-aba1-9ce9a23a03b8",
            "absolutePath": "https://mssub.namava.ir/files/76cdc6f8-4444-4687-aba1-9ce9a23a03b8",
            "default": false,
            "kind": "captions",
            "label": "Farsi.srt",
            "languageCode": "per",
            "displayLabel": "فارسی"

@sajjadshahbazi
Copy link
Author

our app has registration and you can't test that directly

subtitle file:
per.zip

a video stream for sample:
index-v1-a1.zip

sample view:
Screenshot 2023-06-19 142332
Screenshot 2023-06-19 142552
Screenshot 2023-06-19 142424

@icbaker
Copy link
Collaborator

icbaker commented Jun 19, 2023

Is this issue reporting that positioning of some characters is wrong in RTL subtitles? If so I think it's a duplicate of #2194 as you've already linked.

Or is it reporting this:

when I use subView.setViewType(SubtitleView.VIEW_TYPE_WEB) lose focus on android tv

If it's the latter please provide complete and clear information about what 'losing focus' means in this case, and what the resulting symptoms are.

@sajjadshahbazi
Copy link
Author

I continued the issue (#2194), but someone said please make a new issue.

my problem is the positioning of some characters is wrong in RTL subtitles and I can't use subView.setViewType(SubtitleView.VIEW_TYPE_WEB) as a solution, because I lose focus.
can you give me another solution?
if there isn't any solution except using subView.setViewType(SubtitleView.VIEW_TYPE_WEB), how do I resolve the problem of losing focus?

@sajjadshahbazi
Copy link
Author

sajjadshahbazi commented Jun 19, 2023

when starts to play on android tv, no widget in the player doesn't have focus( player controller, and any focusable view in the player), but when one time closes the player controller and again I make it show the player controller, the focus returns. But when I delete the following line :
subView.setViewType(SubtitleView.VIEW_TYPE_WEB)
everything is fine.

when I use subView.setViewType(SubtitleView.VIEW_TYPE_WEB) lose focus on android tv

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

No branches or pull requests

4 participants