| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <title>RTMP</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 players = [["flash", "html5", "download"], ["flash", "download"], ["html5", "download"]]; |
|---|
| 30 | var tests = [{ |
|---|
| 31 | name: "Standard RTMP stream, no provider", |
|---|
| 32 | config: { |
|---|
| 33 | file: "videos/Qvxp3Jnv-483.mp4", |
|---|
| 34 | streamer: "rtmp://fms.12E5.edgecastcdn.net/0012E5", |
|---|
| 35 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg" |
|---|
| 36 | } |
|---|
| 37 | }, { |
|---|
| 38 | name: "Standard RTMP stream, provider", |
|---|
| 39 | config: { |
|---|
| 40 | file: "videos/Qvxp3Jnv-483.mp4", |
|---|
| 41 | streamer: "rtmp://fms.12E5.edgecastcdn.net/0012E5", |
|---|
| 42 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg", |
|---|
| 43 | provider: "RTMP" |
|---|
| 44 | } |
|---|
| 45 | }, { |
|---|
| 46 | name: "RTMP dynamic stream", |
|---|
| 47 | config: { |
|---|
| 48 | file: "http://playertest.longtailvideo.com/dynamic.xml", |
|---|
| 49 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg", |
|---|
| 50 | height: 240, |
|---|
| 51 | width: 500, |
|---|
| 52 | bufferlength: 5, |
|---|
| 53 | plugins: 'qualitymonitor' |
|---|
| 54 | } |
|---|
| 55 | }, { |
|---|
| 56 | name: "RTMP loadbalanced", |
|---|
| 57 | config: { |
|---|
| 58 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg", |
|---|
| 59 | file: 'http://hwcdn.net/i6s8g7u7/fms/dynamic/8Juv1MVa-484.mp4', |
|---|
| 60 | provider: 'rtmp', |
|---|
| 61 | height: 240, |
|---|
| 62 | width: 500, |
|---|
| 63 | bufferlength: 5, |
|---|
| 64 | 'rtmp.loadbalance': true |
|---|
| 65 | } |
|---|
| 66 | }, { |
|---|
| 67 | name: "RTMP loadbalanced dynamic stream", |
|---|
| 68 | config: { |
|---|
| 69 | file: "http://playertest.longtailvideo.com/dynamic.smil", |
|---|
| 70 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg", |
|---|
| 71 | height: 240, |
|---|
| 72 | width: 500, |
|---|
| 73 | bufferlength: 5, |
|---|
| 74 | provider: 'rtmp', |
|---|
| 75 | 'rtmp.loadbalance': true |
|---|
| 76 | } |
|---|
| 77 | }, { |
|---|
| 78 | name: "RTMP livestream", |
|---|
| 79 | config: { |
|---|
| 80 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg", |
|---|
| 81 | file: 'tuxcast', |
|---|
| 82 | streamer: 'rtmp://fml.12E5.edgecastcdn.net/2012E5/', |
|---|
| 83 | 'rtmp.subscribe': true, |
|---|
| 84 | height: 240, |
|---|
| 85 | width: 500 |
|---|
| 86 | } |
|---|
| 87 | }, { |
|---|
| 88 | name: "RTMP livestream + DVR", |
|---|
| 89 | config: { |
|---|
| 90 | image: "http://content.bitsontherun.com/thumbs/gSzpo2wh-480.jpg", |
|---|
| 91 | plugins: 'qualitymonitor', |
|---|
| 92 | file: 'tuxcast', |
|---|
| 93 | 'rtmp.dvr': true, |
|---|
| 94 | streamer: 'rtmp://fml.12E5.edgecastcdn.net/3012E5/', |
|---|
| 95 | height: 240, |
|---|
| 96 | width: 500 |
|---|
| 97 | } |
|---|
| 98 | }]; |
|---|
| 99 | |
|---|
| 100 | for (var test in tests) { |
|---|
| 101 | if (isNaN(test)) { |
|---|
| 102 | break; |
|---|
| 103 | } |
|---|
| 104 | var row = document.createElement("tr"); |
|---|
| 105 | examplestable.appendChild(row); |
|---|
| 106 | var label = document.createElement("td"); |
|---|
| 107 | row.appendChild(label); |
|---|
| 108 | var labelTag = document.createElement("h2"); |
|---|
| 109 | label.appendChild(labelTag); |
|---|
| 110 | labelTag.innerHTML = tests[test].name; |
|---|
| 111 | for (var player in players) { |
|---|
| 112 | if (isNaN(player)) { |
|---|
| 113 | break; |
|---|
| 114 | } |
|---|
| 115 | var column = document.createElement("td"); |
|---|
| 116 | row.appendChild(column); |
|---|
| 117 | var div = document.createElement("div"); |
|---|
| 118 | column.appendChild(div); |
|---|
| 119 | var playerName = ("player-" + tests[test].name + "-" + players[player].join("-")).replace(/[^A-Za-z0-9\-\_]/g, "").toLowerCase(); |
|---|
| 120 | div.id = playerName; |
|---|
| 121 | div.height = 270; |
|---|
| 122 | div.width = 480; |
|---|
| 123 | var config = jwplayer.utils.extend({ |
|---|
| 124 | name: playerName, |
|---|
| 125 | players: settings.players(window.location.href, players[player]) |
|---|
| 126 | }, tests[test].config); |
|---|
| 127 | var setup = jwplayer(playerName).setup(config); |
|---|
| 128 | } |
|---|
| 129 | } |
|---|
| 130 | </script> |
|---|
| 131 | <h3>HTML code</h3> |
|---|
| 132 | </body> |
|---|
| 133 | </html> |
|---|