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

Not capturing the correct selected words for the highlight #142

Open
mrifni opened this issue Sep 17, 2021 · 15 comments
Open

Not capturing the correct selected words for the highlight #142

mrifni opened this issue Sep 17, 2021 · 15 comments
Labels
bug Something isn't working

Comments

@mrifni
Copy link
Contributor

mrifni commented Sep 17, 2021

running the latest develop branch on a real device (oneplus 5)

please see the attached video

bug.record.mov
@mickael-menu
Copy link
Member

Note to self: 0fdf1bffb52048bd849afa7cf698c4c1_sample.epub

@mickael-menu mickael-menu transferred this issue from readium/r2-testapp-kotlin Sep 17, 2021
@mickael-menu
Copy link
Member

I investigated quickly, the saved text seems correct:

{
	"before": "to  manifest  it  over  all  religions,  although  the Mushrikoon hate it.ʺ [Sooratut-Tawbah, 9:33] Audio not supported!\nThe guidance is the beneficial knowledge, while the religion of truth is the ",
	"highlight": "righteous action",
	"after": "  that  is  based  upon  sincerity  to  Allaah  and  following  His Messenger (ﷺ).\nAnd beneficial knowledge includes any knowledge that contains a benefit to the Ummah for its life in the Dunyaa and"
}

Although we can see an interesting issue: "Audio not supported" is part of the highlight snippet even though it's not desired for user presentation:

<audio xmlns="http://www.w3.org/1999/xhtml" src="..." controls="controls">Audio not supported!</audio>

I'm not sure what's wrong with the righteous action snippet though, as even if I reduce the surrounding context to a couple of words, it is still not matched. Other words with duplicates are highlighted properly, even when the snippet contains the "Audio not supported" excerpt:

We might need to escalate this issue to Hypothesis, once this discussion is settled.

@mickael-menu mickael-menu added the bug Something isn't working label Sep 17, 2021
@mickael-menu mickael-menu transferred this issue from readium/r2-navigator-kotlin Jul 29, 2022
@og-abdul-mateen
Copy link

og-abdul-mateen commented Jul 4, 2023

@mrifni but how are you even able to play the audio? I am trying to do the same, but couldn't find any documentation/sample that can do it.

@mickael-menu
Copy link
Member

@og-abdul-mateen You don't have anything to do to support it. However on FXL EPUB it's currently broken because of this issue: #131

@og-abdul-mateen
Copy link

That's interesting. I've been scratching my head over trying to support audiobook + text highlight support (basically Epub3 with MediaOverlay), but couldn't find a sample or documentation for it. Will try it on some Ebooks to see how it goes. Thanks @mickael-menu.

@mickael-menu
Copy link
Member

Media overlays is not the same as <audio> resources embedded in HTML pages. They are not yet supported but will be later this year.

@og-abdul-mateen
Copy link

og-abdul-mateen commented Jul 4, 2023

Umm okay. I have generated some Ebook files of my own using syncabook (plaintext + audio -> SMIL + XHTML -> EPUB3 with MediaOverlay), but as you mentioned, it might not work atm. Is there a spec for the supported <audio> embedded books format so that I can read more about it and maybe create my own versions using some tool?

PS: Sorry for bloating this thread with unrelated questions.

@mickael-menu
Copy link
Member

I would suggest waiting for the Media overlays implementation, this is the most user friendly and easiest to generate. <audio> are just plain HTML elements that are displayed like in this page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio The user must interact with it.

@og-abdul-mateen
Copy link

Do we have any ETA for that?

@mickael-menu
Copy link
Member

Should be in 2023

@og-abdul-mateen
Copy link

og-abdul-mateen commented Jul 10, 2023

@mickael-menu do you have sample Ebooks with audio that work with Readium Kotlin Toolkit on Android? I couldn't make any Ebook audio format work with Readium Android.

@qnga
Copy link
Contributor

qnga commented Jul 10, 2023

https://github.com/IDPF/epub3-samples/releases/download/20230704/cc-shared-culture.epub

This one is supposed to work. If not (with some patience), please report a detailed issue.

@og-abdul-mateen
Copy link

https://github.com/IDPF/epub3-samples/releases/download/20230704/cc-shared-culture.epub

This one is supposed to work. If not (with some patience), please report a detailed issue.

@qnga I tried this sample Ebook. Video works fine, but audio doesn't work. Even it would, this is not what I'm looking for. I guess I'll wait for the official MediaOverlay support in Readium Mobile. So far, Readium looks like the most modern Android library for Ebooks while ticking the right boxes for me (except for the MediaOverlay support).

@og-abdul-mateen
Copy link

@mickael-menu do we have any update on the EPUB3 with MediaOverlay support in Readium Kotlin Toolkit? If it's far away in future, can you suggest another solution that essentially does the same thing?

@mickael-menu
Copy link
Member

It should be available in 2024, I can't be more precise than that.

I'm not sure about any alternative, it depends what you need and if you produce your own publications. If you must consume EPUBs containing media overlays, then no there's no alternative besides implementing it yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants