-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
executable file
·52 lines (49 loc) · 2.28 KB
/
index.html
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
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<head>
<style type="text/css">
span {display: block; font-family: Arial, Helvetica, sans-serif; margin: 25px 0 10px 0; border-radius: 5px; background-color: #FFCCFF; padding: 3px 6px; line-height: 25px; color: #555; font-size: 18px;}
h1 a {color: black; font-size: 20px;}
</style>
</head>
<body>
<h1>ytIframe <a href="https:/mdix/ytIframe">on github</a></h1>
</body>
<script type="text/javascript" src="iframe.js"></script>
<script type="text/javascript">
// video hash
var span = document.createElement('span');
span.innerHTML = "<b>Passing video hash as a string</b></b><br>YtIframe('zUsf-Wyeb5k');";
document.body.appendChild(span);
document.body.appendChild(YtIframe('zUsf-Wyeb5k'));
// video url
var span = document.createElement('span');
span.innerHTML = "<b>Passing video URL as a string</b><br>YtIframe('http://www.youtube.com/watch?v=IXFexk6k39M&feature=context&context=G2cee8caRVAAAAAAAAAg');";
document.body.appendChild(span);
document.body.appendChild(YtIframe('http://www.youtube.com/watch?v=IXFexk6k39M&feature=context&context=G2cee8caRVAAAAAAAAAg'));
// config object with hash
var span = document.createElement('span');
span.innerHTML = "<b>Passing config object with videoHash</b><br>YtIframe({ https: true, width: 160, height: 115, videoHash: 'Gg_wDjrER5E', cookie: true });";
document.body.appendChild(span);
var config = {
https: true,
width: 160,
height: 115,
videoHash: 'Gg_wDjrER5E',
cookie: true
}
document.body.appendChild(YtIframe(config));
// config object with URL
var span = document.createElement('span');
span.innerHTML = "<b>Passing config object with video URL</b><br>YtIframe({ https: true, width: 160, height: 115, videoHash: 'http://www.youtube.com/watch?v=IXFexk6k39M&feature=context&context=G2cee8caRVAAAAAAAAAg', cookie: true });";
document.body.appendChild(span);
var config = {
https: true,
width: 160,
height: 115,
videoHash: 'http://www.youtube.com/watch?v=IXFexk6k39M&feature=context&context=G2cee8caRVAAAAAAAAAg',
cookie: true
}
document.body.appendChild(YtIframe(config));
</script>
</html>