YouTube embed showinfo has been deprecated

后端 未结 8 2128
抹茶落季
抹茶落季 2020-12-10 12:06

We are using a YouTube video on our website as a hero banner.

However few days ago it started showing it\'s title, watch later button and a share button. We were abl

8条回答
  •  时光取名叫无心
    2020-12-10 12:39

    I was looking at the same problem and the only solution I found is to set the video in autoplay and place a transparent layer over the youtube box.

    The user would not be able to interact with the player, but it can be useful in some situation like banner.

    Unfortunately the code doesn't seem to run correctly on stackoverflow I also add a jsfiddle: http://jsfiddle.net/z3dqpuy0/

    .yt-cntainer {
      position: relative;
    }
    		
    .yt-mask {
      position: absolute;
    	top: 0;
    	bottom: 0;
    	left: 0;
    	right: 0;
    }

提交回复
热议问题