fixing a couple of test files to follow the new api.
--- a/test/integration/index-jwplayer.htm Tue Nov 08 10:53:21 2011 +0100
+++ b/test/integration/index-jwplayer.htm Tue Nov 08 14:11:39 2011 +0100
@@ -26,37 +26,36 @@
<script type="text/javascript">
$(document).ready(function() {
var config = {
- metadata:{
- format:'cinelab',
- src:'test.json',
- load:'json'},
gui:{
width:650,
height:1,
mode:'video',
container:'LdtPlayer',
debug:true,
- css:'../../src/css/LdtPlayer.css'},
+ css:'../../src/css/LdtPlayer.css',
+ widgets : [{
+ type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
+ mode: "radio",
+ metadata:{
+ format:'cinelab',
+ src:'../test.json',
+ type:'json'}
+ }]},
player:{
type:'jwplayer',
- src:'../res/swf/player.swf'}
+ flashplayer:'../../res/swf/player.swf',
+ file:'http://127.0.0.1/mdp/test/trailer.mp4',
+ provider:'video',
+ duration: 50}
};
- IriSP.loadLibs(IriSP.lib, config.gui.css, function() {});
- var pop = Popcorn.jwplayer( '#video', "", {"file" : "../trailer.mp4", "duration" : 40, "flashplayer" : "../../res/swf/player.swf"});
- //pop.pause();
- dt = new IriSP.DataLoader();
- ser = new IriSP.JSONSerializer(dt, "../test.json");
- ser2 = new IriSP.JSONSerializer(dt, "../test.json");
- var player = new IriSP.PlayerWidget(pop, config, ser);
- var annotationWidget = new IriSP.AnnotationsWidget(pop, config, ser);
-
- ser.sync(function() { player.draw(); annotationWidget.draw(); });
- /*
- var annotationBar = new IriSP.AnnotationWidget(pop, config, ser);
- ser.sync(IriSP.wrap(annotationBar, draw));
- */
- });
+ IriSP.loadLibs(IriSP.lib, config.gui.css, function() {
+ var layoutManager = new IriSP.LayoutManager(config.gui.container);
+ var pop = IriSP.configurePopcorn(layoutManager, config.player);
+
+ var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); });
+
+ });
</script>
--- a/test/integration/index-radio.htm Tue Nov 08 10:53:21 2011 +0100
+++ b/test/integration/index-radio.htm Tue Nov 08 14:11:39 2011 +0100
@@ -82,7 +82,7 @@
flashplayer : '../libs/player.swf',
live: true,
"controlbar.position" : "none",
- height: 300,
+ height: 1,
width: 640,
provider: "rtmp"
}
--- a/test/integration/index.htm Tue Nov 08 10:53:21 2011 +0100
+++ b/test/integration/index.htm Tue Nov 08 14:11:39 2011 +0100
@@ -23,52 +23,36 @@
<script type="text/javascript">
$(document).ready(function() {
- var config = {
- metadata:{
- format:'cinelab',
- src:'test.json',
- load:'json'},
+ var config = {
gui:{
width:650,
height:1,
- mode:'radio',
+ mode:'video',
container:'LdtPlayer',
debug:true,
- css:'../../src/css/LdtPlayer.css'},
+ css:'../../src/css/LdtPlayer.css',
+ widgets : [{
+ type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
+ mode: "radio",
+ metadata:{
+ format:'cinelab',
+ src:'../test.json',
+ type:'json'}
+ }]},
player:{
- type:'jwplayer',
- src:'../res/swf/player.swf'}
+ type:'html5',
+ file:'../trailer.ogv',
+ duration: 50}
};
- IriSP.loadLibs(IriSP.lib, config.gui.css, function() {});
- pop = Popcorn("#video");
- dt = new IriSP.DataLoader();
- ser = new IriSP.JSONSerializer(dt, "../test.json");
- var player = new IriSP.PlayerWidget(pop, config, ser);
- var annotationWidget = new IriSP.AnnotationsWidget(pop, config, ser);
- ser.sync(function() { player.draw(); annotationWidget.draw(); });
- });
- </script>
-
- <video id='video'
- style="display:;width:300px"
- controls
- preload="auto">
+ IriSP.loadLibs(IriSP.lib, config.gui.css, function() {
+ var layoutManager = new IriSP.LayoutManager(config.gui.container);
+ var pop = IriSP.configurePopcorn(layoutManager, config.player);
+
+ var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); });
- <source id='mp4'
- src="../trailer.mp4"
- type='video/mp4; codecs="avc1, mp4a"'>
-
- <source id='ogv'
- src="../trailer.ogv"
- type='video/ogg; codecs="theora, vorbis"'>
-
- <source id='webm'
- src="../trailer.webm"
- type='video/webm; codecs="vp8, vorbis"'>
-
- <p>Your user agent does not support the HTML5 Video element.</p>
-
- </video>
+ });
+ </script>
+
</body>
</html>
\ No newline at end of file