source: trunk/fl5/js/test/examples/providers.html @ 1736

Revision 1736, 5.8 KB checked in by pablo, 2 years ago (diff)

Removing more tables (fixing IE example generation bugs)

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3    <head>
4        <title>Providers</title>
5        <script type="text/javascript" src="../../bin-debug/jwplayer.js">
6        </script>
7        <script src="https://www.google.com/jsapi?key=ABQIAAAAmW4wY4GLARKwRKxx1EY4dxTCwYuWkdD_iTnqF3uxU7_DebvfxBREab8CD-MRcuvG-IzP2uSZrQpweg" type="text/javascript">
8        </script>
9        <script language="Javascript" type="text/javascript">
10            google.load("ext-core", "3");
11            google.load("dojo", "1");
12            google.load("prototype", "1");
13            google.load("mootools", "1.3.0");
14        </script>
15        <script type="text/javascript" src="settings.js">
16        </script>
17    </head>
18    <body>
19        <script type="text/javascript">
20            document.write("<h1>" + document.title + "</h1>");
21        </script>
22        <p>
23            This test the various configuration options for plugins. Video should play natively on FF, Chrome, Safari, and Opera but will fail in IE.
24        </p>
25               
26                <div id="examples"></div>
27               
28        <script type="text/javascript">
29            var players = [["flash", "html5", "download"], ["flash", "download"], ["html5", "download"]];
30            var tests = [{
31                name: "Video (not set)",
32                config: {
33                        levels: [{
34                                file: "http://content.bitsontherun.com/videos/gSzpo2wh-486405.mp4"
35                        }, {
36                                file: "http://content.bitsontherun.com/videos/gSzpo2wh-604476.ogv"
37                        }],
38                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg"
39                }
40            }, {
41                name: "Video (set)",
42                config: {
43                        levels: [{
44                                file: "http://content.bitsontherun.com/videos/gSzpo2wh-486405.mp4"
45                        }, {
46                                file: "http://content.bitsontherun.com/videos/gSzpo2wh-604476.ogv"
47                        }],
48                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
49                        type: "video"
50                }
51            }, {
52                name: "HTTP (not set)",
53                config: {
54                        file: "http://content.bitsontherun.com/videos/gSzpo2wh-486405.mp4",
55                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg"
56                }
57            }, {
58                name: "HTTP (set)",
59                config: {
60                        file: "http://content.bitsontherun.com/videos/gSzpo2wh-486405.mp4",
61                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
62                        type: "http"
63                }
64            }, {
65                name: "Sound (not set)",
66                config: {
67                        file: "http://playertest.longtailvideo.com/bunny.mp3",
68                        height: 24,
69                        width: 400
70                }
71            }, {
72                name: "Sound (set)",
73                config: {
74                        file: "http://playertest.longtailvideo.com/bunny.mp3",
75                        height: 24,
76                        width: 400,
77                        type: "sound"
78                }
79            }, {
80                name: "RTMP (not set)",
81                config: {
82                        file: "videos/Qvxp3Jnv-483.mp4",
83                        streamer: "rtmp://fms.12E5.edgecastcdn.net/0012E5",
84                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg"
85                }
86            }, {
87                name: "RTMP (set)",
88                config: {
89                        file: "videos/Qvxp3Jnv-483.mp4",
90                        streamer: "rtmp://fms.12E5.edgecastcdn.net/0012E5",
91                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
92                        type: "RTMP"
93                }
94            }, {
95                name: "YouTube (not set)",
96                config: {
97                        file: "http://youtube.com/watch?v=IBTE-RoMsvw",
98                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg"
99                }
100            }, {
101                name: "YouTube (set)",
102                config: {
103                        file: "http://youtube.com/watch?v=IBTE-RoMsvw",
104                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
105                        type: "youtube"
106                }
107            }, {
108                name: "Image (not set)",
109                config: {
110                        file: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
111                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg"
112                }
113            }, {
114                name: "Image (set)",
115                config: {
116                        file: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
117                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg",
118                        type: "image"
119                }
120            }];
121           
122            for (var test in tests) {
123                if (isNaN(test)) {
124                        break;
125                }
126                var row = document.createElement("div");
127                document.getElementById("examples").appendChild(row);
128                var label = document.createElement("span");
129                row.appendChild(label);
130                var labelTag = document.createElement("h2");
131                label.appendChild(labelTag);
132                labelTag.innerHTML = tests[test].name;
133                for (var player in players) {
134                        if (isNaN(player)) {
135                                break;
136                        }
137                        var div = document.createElement("div");
138                        row.appendChild(div);
139                        var playerName = ("player-" + tests[test].name + "-" + players[player].join("-")).replace(/[^A-Za-z0-9\-\_]/g, "").toLowerCase();
140                        div.id = playerName;
141                        div.height = 270;
142                        div.width = 480;
143                        var config = jwplayer.utils.extend({
144                                name: playerName,
145                                players: settings.players(window.location.href, players[player])
146                        }, tests[test].config);
147                        var setup = jwplayer(playerName).setup(config);
148                }
149            }
150        </script>
151        <h3>HTML code</h3>
152    </body>
153</html>
Note: See TracBrowser for help on using the repository browser.