feat: totally destory artplayer after leaving page

This commit is contained in:
shinya
2025-08-26 02:29:46 +08:00
parent 674d33632e
commit 91031b1a2d
2 changed files with 43 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ export async function GET(request: Request) {
const contentType = response.headers.get('Content-Type') || '';
// rewrite m3u8
if (contentType.toLowerCase().includes('mpegurl')) {
if (contentType.toLowerCase().includes('mpegurl') || contentType.toLowerCase().includes('octet-stream')) {
// 获取最终的响应URL处理重定向后的URL
const finalUrl = response.url;
const m3u8Content = await response.text();