Fabian B.
Explore posts from serversDoes anyone know if @canplaythrough is still a valid listener to use on a `<video /> ` element?
Yeah I see, unfortunately, there is no native way of lazy loading videos. But you could add a short script that listens to the scroll event and when the video is inside the video, start rendering it.
8 replies
Does anyone know if @canplaythrough is still a valid listener to use on a `<video /> ` element?
Hi there! From your implementation, it looks like the video can never start to load, because you do not render it (isLoading is true on component load).
8 replies
Intercepting Routes
Hey there! You can do this with nested routes:
https://nuxt.com/docs/guide/directory-structure/pages#nested-routes
The way it works is you have a parent page component that is displayed when the modal is closed. (in your case
/
).
Then, when navigating to /modal
, the child route gets loaded, which could open the modal.3 replies
Fetch method Not Allowed, but works in other clients
405 means that the HTTP method is not allowed. When you do a
fetch
or $fetch
(which I would suggest) without configuration, it performs a GET request. However, when visiting https://api.fxer.net/api/trial
in the browser, you get an 405 Method not allowed.
This means you likely need to do a POST or check their documentation.
Read more about $fetch
https://nuxt.com/docs/api/utils/dollarfetch34 replies