-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.html
57 lines (49 loc) · 1.58 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
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title>AngularJs Video Directive</title>
</head>
<body ng-app="myApp">
<div ng-controller="AppCtrl" style="margin: 0px auto">
<h1>anguVideo</h1>
<p>
This is a directive that takes in a vimeo or a youtube url and converts it into an embedded friendly url and the displays it.
</p>
<p>
<strong>Note:</strong> If an embedded friendly url is provided then the directive will simply gets the trusted resource url using angular's trustAsResourceUrl() functionality and then display the video
</p>
<h5> Url formats:</h5>
<ul>
<li>http://www.youtube.com/watch?v=[xyzxyz]</li>
<li>http://youtu.be/[xyzxyz]</li>
<li>http://www.youtube.com/embed/[xyzxyz]</li>
<li>http://vimeo.com/[xyzxyz]</li>
</ul>
<h3> Attributes</h3>
<p>
width: width="[number]%" or width="[number]" - for px
<br> <br>
height: height="[number]"
</p>
<br> <br>
<h3>YouTube Examples</h3>
<hr>
<div>{{youTubeURL}}</div>
<div anguvideo ng-model="youTubeURL" width="250" height="250"></div>
<br> <br>
<div>{{youTubeShareURL}}</div>
<anguvideo ng-model="youTubeShareURL" width="300" height="400"></anguvideo>
<br> <br>
<div>{{youTubeEmbededURL}}</div>
<anguvideo ng-model="youTubeEmbededURL" width="50%" height="300"></anguvideo>
<h3>Vimeo Examples</h3>
<hr>
<div>{{vimeoURL}}</div>
<anguvideo ng-model="vimeoURL" width="50%" height="500"></anguvideo>
<br> <br>
</div>
<script src="./bower_components/angular/angular.js"></script>
<script src="./js/controller.js"></script>
<script src="js/anguvideo.js"></script>
</body>
</html>