Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2024, 07:00 AM   #1
Daniele Giampà
Member
Daniele Giampà began at the beginning.
 
Daniele Giampà's Avatar
 
Posts: 17
Karma: 20
Join Date: Jan 2024
Location: London
Device: none
Remote resource reference

Hello

I created a generative poem on my web page and I converted it into an EPUB3 document.
I used GSAP to create two animations and in the EPUB Check I get the following error:

Remote resource reference is not allowed in this context; resource "https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" must be located in the EPUB container.

What does this mean?

I work with Oxygen XML and Sigil.

I am looking forward to your feedback.

Daniele
Daniele Giampà is offline   Reply With Quote
Old 01-30-2024, 10:26 AM   #2
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,541
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Daniele Giampà View Post
Hello

I created a generative poem on my web page and I converted it into an EPUB3 document.
I used GSAP to create two animations and in the EPUB Check I get the following error:

Remote resource reference is not allowed in this context; resource "https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" must be located in the EPUB container.

What does this mean?
The gasp.min.js file that's referenced in your ePub is not part of your epub, it's on a cloudflare server. This is usually fine for a web page, but not for an ePub, where all required resources must be part of the ePub. You'll need to get a copy of the file and include it in the ePub and then make sure references to it are to the ePub copy, not the copy on cloudflare. You should probably check that you're allowed to do that under whatever licence covers the gsap code.

Whether the javascript animations will work in an ePub is not something I know. It certainly won't work in all ePub readers.
pdurrant is offline   Reply With Quote
Advert
Old 01-31-2024, 06:49 AM   #3
Daniele Giampà
Member
Daniele Giampà began at the beginning.
 
Daniele Giampà's Avatar
 
Posts: 17
Karma: 20
Join Date: Jan 2024
Location: London
Device: none
Thank you for the quick reply.

I found the GASP files and created two new code files.
Can I insert them in the folder OEBPS/Misc with all my other JavaScript files?

The licence is not a problem because I won't sell my EPUB.
Attached Thumbnails
Click image for larger version

Name:	Misc folder.png
Views:	91
Size:	150.0 KB
ID:	206130  
Daniele Giampà is offline   Reply With Quote
Old 01-31-2024, 07:02 AM   #4
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,541
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Since other .js files are already there, that seems the right place. Then you'll need to find and update the references to them in your (X)HTML.

And you're right - for personal projects the gsap libraries are free. But you should sign up with them for their free licence. Free doesn't mean you may use it without permission. https://gsap.com/pricing/

But if you ever do want to sell the epub you'll need to buy a licence.

Last edited by pdurrant; 01-31-2024 at 07:05 AM.
pdurrant is offline   Reply With Quote
Old 02-03-2024, 12:17 PM   #5
Daniele Giampà
Member
Daniele Giampà began at the beginning.
 
Daniele Giampà's Avatar
 
Posts: 17
Karma: 20
Join Date: Jan 2024
Location: London
Device: none
I edited the files. In the CSS file, I deactivated the display function of the verses, and now all the verses are visible;

.verse {
/* display: none; */
z-index: 3;
}

In the JavaScript file, I replaced the existing code with a new code and nothing happened; the JS doesn't connect with the XHTML file;

The current version of the EPUB can be downloaded from the following page: https://www.edgedpub.com/sample_work_6.php

I also created a pen with the same files https://codepen.io/edgedpub/pen/BabrNzz
Daniele Giampà is offline   Reply With Quote
Advert
Old 02-11-2024, 07:34 AM   #6
Daniele Giampà
Member
Daniele Giampà began at the beginning.
 
Daniele Giampà's Avatar
 
Posts: 17
Karma: 20
Join Date: Jan 2024
Location: London
Device: none
The JavaScript animation works now!

In the XHTML file, I moved the JS link from the <head> to the last line of the <body>.

https://www.edgedpub.com/sample_work_6.php
Daniele Giampà is offline   Reply With Quote
Reply

Tags
container, epub3, epubcheck, epubcheck error


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource does not exist. Karellen Editor 4 01-14-2023 02:46 AM
best solution for remote page turns? phone? bluetooth selfie remote? bluetooth mouse arooni Onyx Boox 2 09-13-2021 09:07 PM
What a resource! blar Introduce Yourself 2 05-19-2021 10:21 AM
just another resource gheatza Deals and Resources (No Self-Promotion or Affiliate Links) 6 10-15-2010 05:31 AM
MR Resource Stitchawl Lounge 22 08-16-2009 11:24 AM


All times are GMT -4. The time now is 05:33 AM.


MobileRead.com is a privately owned, operated and funded community.