Vous êtes sur la page 1sur 3

You can find your plugin and guide at:

www.squareplugins.com/video-controls-code

The password is:

xvyw9e97235

Here is Youtube Code (login to website above for directions):

<script
src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.mi
n.js"></script>
<script
src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script>
<scripttype="text/javascript"
src="https://www.youtube.com/player_api"></script>
<scripttype="text/javascript">
functiononYouTubeIframeAPIReady(){init()}functioninit(){url=$
(".sqsvideobackground,.galleryvideo
background").first().attr("dataconfig
url"),build_player(),build_controls(),add_control_listeners()}fun
ctionbuild_player(){if(vimeo){var
a=document.getElementById("vimeoplayer");player=$f(a)}else
player=YT.get("player")}functionbuild_controls(){vara=".banner
thumbnailwrapper,#bannerareawrapper,.bannerimage,.title
descwrapper,.indexsectionwrapper,.imagewrapper,.Intro,
.mainimage",b=".sqsslide",c=".sqsslidelayercontent";$
(c).length>0&&(b=c);vard=$(a+","+b).first();d.append('<div
id="button_container"></div>'),vimeo&&$
("#button_container").append('<divid="play_pause"
class="button_switcher"><img
src="https://static1.squarespace.com/static/54dcf1f3e4b03174c3dc7
5f5/t/5800e78959cc685e1418ff13/1476454281822/whiteplay.png"
class="video_buttonplay_pause_btn"id="play_button"/><img
src="https://static1.squarespace.com/static/54dcf1f3e4b03174c3dc7
5f5/t/5800e75f29687f13a413de10/1476454239130/whitepause.png"
class="video_buttonplay_pause_btn"id="pause_button"/></div>'),$
("#button_container").append('<divid="mute_unmute"
class="button_switcher"style="marginleft:5px;"><img
src="https://static1.squarespace.com/static/54dcf1f3e4b03174c3dc7
5f5/t/57f42eaa893fc0123d94e98d/1475620522820/whtmute.png"
class="video_buttonmute_unmute_btn"id="mute_button"/><img
src="https://static1.squarespace.com/static/54dcf1f3e4b03174c3dc7
5f5/t/57f42e99893fc0123d94e8e4/1475620505075/whtsound.png"
class="video_buttonmute_unmute_btn"
id="unmute_button"/></div>'),$
("#button_container").css({position:"absolute",width:"60px",heigh
t:"35px",right:"15px",bottom:"15px","zindex":1e4}),$
(".button_switcher").css({width:"35px",height:"35px",position:"re
lative",display:"inlineblock"}),$
(".video_button").css({display:"inline
block",position:"absolute","vertical
align":"top",opacity:.99,width:"35px",height:"35px",cursor:"point
er"}),$("#play_button,#unmute_button").css("opacity",0)}function
add_control_listeners(){$(".play_pause_btn").click(function()
{build_player(),paused?(vimeo?
player.api("play"):player.playVideo(),paused=!1):(vimeo?
player.api("pause"):player.pauseVideo(),paused=!
0),play_pause_switch()}),$(".mute_unmute_btn").click(function()
{build_player(),muted?(vimeo?
player.api("setVolume",.5):player.unMute(),muted=!1):(vimeo?
player.api("setVolume",0):player.mute(),muted=!
0),mute_unmute_switch()})}functionplay_pause_switch(){paused?($
("#play_button").animate({opacity:.99},500),$
("#pause_button").animate({opacity:0},1e3)):($
("#play_button").animate({opacity:0},1e3),$
("#pause_button").animate({opacity:.6},500))}function
mute_unmute_switch(){muted?($
("#mute_button").animate({opacity:.99},500),$
("#unmute_button").animate({opacity:0},500)):($
("#mute_button").animate({opacity:0},500),$
("#unmute_button").animate({opacity:.6},500))}var
player,url,paused=!1,muted=!0,vimeo=!1;
</script>

SquareStudio