我想把许多youtube视频放在我的页面上,但我有以下问题



控制台中的错误语句

在"preloadResponse"结算之前,服务工作程序导航预加载请求已取消。如果您打算使用"preloadResponse",请使用waitUntil((或responsdWith((等待promise结算。

我应该把它放在哪里?我应该怎么做?有什么简单而好的解决方案吗?

我正在用vue中的vuetify建立一个简单的网站。我正在使用jquery和css来调整它。为了供您参考,我将把我正在使用的函数放在下面。

<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>

您可以尝试在event.preloadResponse promise上使用waitUntil((方法:

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

最新更新