Embed youtube video without youtube link

后端 未结 6 790
野趣味
野趣味 2021-02-09 21:08

as you know that when you Embed youtube video in your web page, it works fine , but if you click on any part of screen, youtube website will open in new window.

is there

6条回答
  •  借酒劲吻你
    2021-02-09 21:26

    there are a few ways to do this like (depending on your programmer skills):

    REQUIRE JS knowledge: - use the JS api from google and disable the normal buttons and add customs buttons and events (there are a lot of examples in their documentation)

    NO PROGRAMMER skills:

    • use another player
    • and the way i did: i put a DIV ontop of the player (except the part where the seek/controls are). This prevents the user to click on a desired part of the embedded player but allows you to still use the controls (play/pause/seek/view in youtube)

    USAGE for above solutions: - if you want to click on the player and trigger an action without starting to play the Youtube video - disable: youtube click / open youtube in another window

    HOPE THIS WILL HELP YOU

提交回复
热议问题