タチコマ
タチコマ

Reputation: 23

I want to put many of youtube videos on my page, but I have the following problem

Error statement in console

The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle.

Where exactly should I put it and how should I do it? Is there any simple and good solution?

I am setting up a simple site with vuetify in vue. I am using jquery and css to adjust it. For your reference, I will put the functions I am using below.

<v-col class="youtube_col" xs="12">
    <iframe class="youtube" src="https://www.youtube.com/embed/tpk0PxK-c5E"
        title="YouTube video player" frameborder="0"
        allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
        allowfullscreen></iframe>
</v-col>

Upvotes: 0

Views: 252

Answers (1)

Mohamed Elgazar
Mohamed Elgazar

Reputation: 794

You could try using the waitUntil() method on the event.preloadResponse promise:

event.waitUntil(event.preloadResponse.then(function(response) {
  // do something with the response
}));

Upvotes: 2

Related Questions