-
Notifications
You must be signed in to change notification settings - Fork 1
/
scripts.js
44 lines (39 loc) · 1.4 KB
/
scripts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Some settings coming from: http://stackoverflow.com/questions/35044594/youtube-how-to-present-embed-video-with-sound-muted
// More documentation: https://developers.google.com/youtube/player_parameters#modestbranding
function onYouTubeIframeAPIReady() {
var player;
player = new YT.Player('YouTube-player', {
videoId: 'wIxQXsr00F0', // YouTube Video ID
width: 560, // Player width (in px)
height: 316, // Player height (in px)
playerVars: {
autoplay: 1, // Auto-play the video on load
controls: 1, // Show pause/play buttons in player
showinfo: 0, // Hide the video title
modestbranding: 1, // Hide the Youtube Logo
autohide: 1, // Hide video controls when playing
rel: 0, // Not showing related
// loop: 0, // Run the video in a loop
// fs: 0, // Hide the full screen button
// cc_load_policy: 0, // Hide closed captions
// iv_load_policy: 3, // Hide the Video Annotations
},
events: {
onReady: function(e) {
e.target.mute();
},
onStateChange: function(e) {
console.log(e);
if(e.data === YT.PlayerState.ENDED) {
}
}
}
});
}
function formSubmit(event) {
event.preventDefault();
setTimeout(function() {
window.location = "http://asc.ai/info";
}, 1000);
return false;
}