source: trunk/fl5/js/test/examples/modespecificconfig.html @ 1550

Revision 1550, 4.4 KB checked in by zach, 2 years ago (diff)
  • Modes alias now handled 1171
  • Unknown / no file extensions now play in all modes 1178
  • Icons = false supported by HTML5 player 1141
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>Mode Specific Config</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        <table id="examplestable">
26        </table>
27        <script type="text/javascript">
28            var examplestable = document.getElementById("examplestable");
29            var flashsrc = window.location.href.substring(0, window.location.href.indexOf("/js/test/examples") + 1) + "player.swf";
30           
31            var players = [[{
32                type: "flash",
33                src: flashsrc,
34                config: {
35                        streamer: "rtmp://fms.12E5.edgecastcdn.net/0012E5"
36                }
37            }, {
38                type: "html5",
39                config: {
40                        levels: [{
41                                file: "http://content.bitsontherun.com/videos/DMJODX8R-486405.mp4"
42                        }, {
43                                file: "http://content.bitsontherun.com/videos/DMJODX8R-604476.ogv"
44                        }],
45                        image: "http://content.bitsontherun.com/thumbs/DMJODX8R-480.jpg"
46                }
47            }, {
48                type: "download",
49                config: {
50                        image: "http://content.bitsontherun.com/thumbs/guYqV1AB-480.jpg"
51                }
52            }], [{
53                type: "html5",
54                config: {
55                        levels: [{
56                                file: "http://content.bitsontherun.com/videos/DMJODX8R-486405.mp4"
57                        }, {
58                                file: "http://content.bitsontherun.com/videos/DMJODX8R-604476.ogv"
59                        }],
60                        image: "http://content.bitsontherun.com/thumbs/DMJODX8R-480.jpg"
61                }
62            }, {
63                type: "download",
64                config: {
65                        image: "http://content.bitsontherun.com/thumbs/guYqV1AB-480.jpg"
66                }
67            }], [{
68                type: "download",
69                config: {
70                        image: "http://content.bitsontherun.com/thumbs/guYqV1AB-480.jpg",
71                                        file: "http://content.bitsontherun.com/videos/gSzpo2wh-486405.mp4"
72                }
73            }]];
74            var tests = [{
75                name: "RTMP",
76                config: {
77                        file: "videos/Qvxp3Jnv-483.mp4",
78                        image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg"
79                }
80            }];
81           
82           
83            for (var test in tests) {
84                if (isNaN(test)) {
85                        break;
86                }
87                var row = document.createElement("tr");
88                examplestable.appendChild(row);
89                var label = document.createElement("td");
90                row.appendChild(label);
91                var labelTag = document.createElement("h2");
92                label.appendChild(labelTag);
93                labelTag.innerHTML = tests[test].name;
94                var i = 0;
95                for (var player in players) {
96                        if (isNaN(player)) {
97                                break;
98                        }
99                        var column = document.createElement("td");
100                        row.appendChild(column);
101                        var div = document.createElement("div");
102                        column.appendChild(div);
103                        var playerName = "player-" + tests[test].name + "-" + i++;
104                        div.id = playerName;
105                        div.height = 270;
106                        div.width = 480;
107                        var config = jwplayer.utils.extend({
108                                name: playerName,
109                                players: players[player]
110                        }, tests[test].config);
111                        var setup = jwplayer(playerName).setup(config);
112                }
113            }
114        </script>
115        <h3>HTML code</h3>
116    </body>
117</html>
Note: See TracBrowser for help on using the repository browser.