![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,786
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
An issue with the .opf
I'm thinking to replace in my epub3 the JS program "Hyphenator" by the also JS program "Hyphenopoly". But I'm running into a problem: Hyphenopoly uses .wasm files as language patterns, which I include in Sigil's Misc folder. Hyphenopoly works fine, but when I open the epubs that contain it with Sigil, I get the following warning message:
Warning: the OPF contains missing or unrecognized media types... Of course, in the .opf, the .wasm files have the media type 'application/wasm' that causes the warning. Is there a way to suppress that message? By the way, epubcheck also gives the same warning; by chance, are .wasm files prohibited files? |
![]() |
![]() |
![]() |
#2 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
|
They are not recognized media file types according to the epub 3.3 spec. You may be able to "hide" them in the METAINF folder but not sure. WebAssembly files do not run with every browser.
Since they are binary data files that are only opened by javascript, perhaps including their data directly into the js file might be best for that. According to a web search you can do that by encoding the Wasm binary as a base64 string and then decoding it within the JavaScript code. The epub 3.4 spec is currently working on this, and may add support for webassembly .wasm files. Hard to follow but I found this: https://w3c.github.io/pm-wg/minutes/...2-27.html#d6c2 The epub 3.4 spec is the one that is proposing allowing pure html as well. It will be a few months before it gets approved one way or the other. Here is a quote from the draft epub 3.4 spec: Quote:
Once whatever form of epub 3.4 spec gets finally approved, then a future version of Sigil will add them to its recognized media types list. But it may take awhile until epubcheck allows them. That also means most publishers will not currently allow them. Last edited by KevinH; 07-20-2025 at 12:46 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,786
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
So, until "media type 'application/wasm'" is approved, placing the .wasm files in META-INF works. By the way, except for IE, practically all browser supports .wasm: https://caniuse.com/wasm Last edited by RbnJrg; Today at 01:08 PM. |
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Understand that Qt's QtWebEngine is just lately based on Chrome 138 and that is the first support for Android as well. So this support is quite recent and may not work with Qt 5 or Qt 6 up to 6.6 or 6.7.
I am glad to hear that hiding them in METAINF works for you. Do you still include them in the manifest itself with the href pointing into METAINF under a different media-type or just not mention they are there at all in the OPF? Last edited by KevinH; Today at 02:57 PM. |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,786
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
By the way, under Sigil Hyphenopoly doesn't work (it has issues with the fetch api) but it works fine with ereaders. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
|
I think there is a QtWebEngineProfile setting that enables the fetch api. If the fetch is foreign though you would have to enable the remote access in Sigil Preferences too.
Is the that js opening any Windows, as I think that is disabled as well? Can you please post a very simple epub test case with it and I will see if I can get things to work on Sigil too by changeing the WebProfile settings that Sigil uses. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
IngramSpark citing content.opf errors I can't find in the .opf | persand | Calibre | 4 | 03-21-2019 10:49 AM |
epub3 kobo external video opf issue | Ryn | ePub | 21 | 01-13-2018 05:34 PM |
Change opf filename from content.opf to title.opf | northstar7 | Sigil | 3 | 09-23-2013 12:44 PM |
Nook Covers OPF Issue | DTM | Sigil | 2 | 08-03-2013 05:39 PM |
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? | DHahn | Kindle Formats | 3 | 04-17-2012 04:06 AM |