소스 검색

hotfix 應片播放按鈕隱藏

VicCG.Lin 9 달 전
부모
커밋
b1530256a1
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    2
      src/fe/mrna/js/main.js

+ 3
- 2
src/fe/mrna/js/main.js 파일 보기

@@ -442,12 +442,13 @@ main = function () {
442 442
 
443 443
 	function onPlayerStateChange(event) {
444 444
 		// console.log(event.target.o.id)
445
+		const iframe = event.target.getIframe();
445 446
 		if (event.data == YT.PlayerState.PLAYING) {
446
-			$(`#${event.target.o.id}`).parents(".video").find(".video__overlay").hide();
447
+			$(iframe).parents(".video").find(".video__overlay").hide();
447 448
 		}
448 449
 		// console.log(event.data)
449 450
 		if (event.data == -1) {
450
-			$(`#${event.target.o.id}`).parents(".video").find(".video__overlay").show();
451
+			$(iframe).parents(".video").find(".video__overlay").show();
451 452
 		}
452 453
 	}
453 454