Problem/Motivation

ReadSpeaker support has suggested to also offer support for the product docReader, used to read online documents (pdf, docx, epub etc).

It could be a checkbox that the user checks, and codewise it will be an extra parameter to the webReader javascript.

If there's interest for this new feature, ReadSpeaker support is willing to provide us with more information.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

ressa created an issue. See original summary.

sunlix’s picture

@ressa can you provide the needed informations to get this feature adapted?
Links to the online documentation or information from the ReadSpeaker support would be helpful.

ressa’s picture

Status: Active » Postponed

Absolutely @sunlix, I just wrote to them, and will share their reply here.

ressa’s picture

Status: Postponed » Needs work

@sunlix: I got some info from ReadSpeaker support, about their ReadSpeaker docReader, please let me know if you need more details.

The primary way we think should be integrated into OpenReadSpeaker is the AutoAdd script. The script is loaded by adding the parameter revdload=DocReader.AutoAdd to the webReader.js script-url.

In addition, configuration is then done by this object:

window.rsConf.docReader

The most important are the language settings.
rsConf.docReader.lang: string with language to use for automatically added links
rsConf.docReader.hrefLang: boolean to indicate whether to use the hreflang of document links to determine language.

The configuration object looks like this:

window.rsConf = {
    docReader = {
        lang = "en_uk", // For example.
    }
}

The plugin should only create one rsConf object, and "merge" in the docReader member, as other keys control webReader itself.

If you want to supply a checkbox when uploading documents, disabling docReader for a specific link can be done by adding the class rspkr_dr_added.

pascuperbla’s picture

StatusFileSize
new4.35 KB

The attached patch allows this feature to be available.

sunlix’s picture

@pascuperbla thank you for your contribution.

Please setup a Merge Request so reviewing the changes will be a lot easier und can be guided through the built-in review process.
Thank you.