test/integration/index-youtube.htm
author hamidouk
Wed, 26 Oct 2011 11:32:21 +0200
branchpopcorn-port
changeset 147 955119f901b4
parent 102 67e8179afde5
permissions -rw-r--r--
added a function to search annotations to the json serializer.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
82
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     2
<html dir="ltr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml" lang="fr">
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     3
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     4
<head>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     5
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     6
</head>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     7
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     8
<body>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
     9
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    10
	<div style="width:650px;font-family: 'Trebuchet MS', 'Helvetica', 'Arial',  'Verdana', 'sans-serif';">
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    11
	<h1>MetaDataPlayer </h1>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    12
	Test d'intégration du widget du player avec Popcorn (Youtube).
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    13
	</div>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    14
	
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    15
	
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    16
 <!-- START Integration  ###################################### -->
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    17
 <!-- SIMPLE PLAYER EXPERIMENTATION -->
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    18
	<script type="text/javascript" src="../../build/LdtPlayer-release.js"></script> 
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    19
	<script src="../../res/js/jquery.min.js"></script>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    20
	<script src="../../res/js/jquery.tools.min.js"></script>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    21
	<script src="../../res/js/jquery-ui.min.js"></script>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    22
	<div id="LdtPlayer"></div>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    23
	
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    24
	<script  type="text/javascript">
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    25
	$(document).ready(function() {
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    26
		var config = {
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    27
						metadata:{
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    28
							format:'cinelab',
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    29
							src:'test.json',
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    30
							load:'json'},
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    31
						gui:{
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    32
							width:650,
102
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    33
							height:64,
82
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    34
							mode:'radio',
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    35
							container:'LdtPlayer',
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    36
							debug:true,
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    37
							css:'../../src/css/LdtPlayer.css'},
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    38
						player:{
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    39
							type:'jwplayer',
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    40
							src:'../res/swf/player.swf'}
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    41
					};
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    42
		
102
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    43
		IriSP.loadLibs(IriSP.lib, config.gui.css, function() {});
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    44
		
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    45
		templ = "width: {{width}}px; height: {{height}}px; margin-bottom: 5px;";
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    46
		var str = Mustache.to_html(templ, {width: config.gui.width, height: config.gui.height});    
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    47
		// Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    48
		IriSP.jQuery("#Ldt-PlaceHolder").attr("style", str);
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    49
		
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    50
		var pop = Popcorn.youtube("#Ldt-PlaceHolder", "http://www.youtube.com/watch?v=lFtNG1wZ4zU", {controls: 0});    
82
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    51
		var dt = new IriSP.DataLoader();
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    52
		var ser = new IriSP.JSONSerializer(dt, "../test.json");
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    53
		var player = new IriSP.PlayerWidget(pop, config, ser);
102
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    54
		var annotationWidget = new IriSP.AnnotationsWidget(pop, config, ser);
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    55
		var segmentsWidget = new IriSP.SegmentsWidget(pop, config, ser);
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    56
		ser.sync(function() { player.draw();  annotationWidget.draw(); segmentsWidget.draw();});
88
4de2f474ca01 changes to the integration files.
hamidouk
parents: 82
diff changeset
    57
		
82
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    58
	});
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    59
	</script>
102
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    60
<div id='Ldt-Root'>
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    61
	<div id='Ldt-PlaceHolder'>
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    62
	</div>
67e8179afde5 changed the youtube integration testing file to use segmentsWidget too.
hamidouk
parents: 88
diff changeset
    63
</div>	
82
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    64
<!-- END  ################  ###################################### -->
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    65
 </body>
b9a26940e7cc two integration testing files, for jwplayer and youtube.
hamidouk
parents:
diff changeset
    66
 </html>