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

Next pages show current page instead of loader when flipping #86

Open
mediavrog opened this issue Jan 23, 2023 · 8 comments
Open

Next pages show current page instead of loader when flipping #86

mediavrog opened this issue Jan 23, 2023 · 8 comments

Comments

@mediavrog
Copy link

mediavrog commented Jan 23, 2023

Version: 1.0.0-beta.4
used with VueJS3 inside nuxt

Steps to reproduce:

  • create flipbook with >10 images/pages
  • flip quickly between pages when network is weak (mobile or developer tools network speed throttling)
  • notice that the image on page being flipped appears briefly (as long as it takes to load it) as the next page
<template>
  <div>
    <client-only>
      <flipbook
          class="flipbook"
          :pages="images"
          :pagesHiRes="imagesHq"
          gloss="0.5"
      ></flipbook>
    </client-only>
  </div>
</template>

What I expected:

  • during loading, I'd expect a blank page with the loading indicator

Will attach a video

@mediavrog
Copy link
Author

23-01-22-19-14-14.1.mp4

@mediavrog mediavrog changed the title Next pages load late and show current page instead of loader when flipping Next pages show current page instead of loader when flipping Jan 23, 2023
@kabaluyot
Copy link

@mediavrog that use case looks great. How did to worked with opensea? The image src points to html page with flipbook?

@mediavrog
Copy link
Author

@mediavrog that use case looks great. How did to worked with opensea? The image src points to html page with flipbook?

animation_url is used. Html and assets need proper CORS then all works well

@ts1
Copy link
Owner

ts1 commented Jan 29, 2023

I tried it on my demo page and was able to reproduce it on Chrome's slow network emulation, but not on an Android machine on a very slow network with Wi-Fi turned off.

Flipbook-vue loads the same image URL in advance with new Image and then after onload actually uses it in <img>, background-image etc.
This means that if caching is properly enabled on the browser side, this problem will not occur.
Conceivably, the server on which you are hosting the image does not allow caching properly?

@mediavrog
Copy link
Author

Screenshot 2023-01-29 at 21 56 13

I set cache to one week and headers look alright.
I wonder if an iframe could somehow interfere with this.

@mediavrog
Copy link
Author

Ok I also noticed the issue occurs mainly if I disable caching in the network console. But shouldn't the flipper show the loading svg in that case and then the image?

@ts1
Copy link
Owner

ts1 commented Jan 30, 2023

It should, but since it is difficult to manage strictly, it treats URLs as cached once they have been loaded successfully.

@mediavrog
Copy link
Author

I see.
A proper caching inside the plugin would resolve this then..

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

No branches or pull requests

3 participants