浏览代码

fix: change null soundcloud iframe src to blank player page instead of null to fix weird issues in some browsers

Kristian Vos 1 年之前
父节点
当前提交
199fe65187
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      frontend/src/composables/useSoundcloudPlayer.ts

+ 4 - 1
frontend/src/composables/useSoundcloudPlayer.ts

@@ -251,7 +251,10 @@ export const useSoundcloudPlayer = () => {
 			return;
 		}
 		if (!url) widgetId.value = null;
-		soundcloudIframeElement.value.setAttribute("src", url);
+		soundcloudIframeElement.value.setAttribute(
+			"src",
+			url ?? `${soundcloudDomain}/player`
+		);
 	};
 
 	const documentUnlockEventListener = () => {