Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Audiocours, browser preview: slides are now properly synced with audio

- Videocours, browser preview: a 3 seconds delay has been added to have a better syncho with the slides (approximate encoder startup time)
- browser preview : if port 80 is already used a dialog box is shown informing that port must be free first (Skype, server?) or changed in the configuration file if you want to use the browser preview feature  

git-svn-id: https://subversion.renater.fr/audiovideocours/trunk/client_and_standalone@986 f5520b42-8414-0410-9ae7-91ee0cd12377
  • Loading branch information...
commit 7ba0fa3a1fa71f2b2e75a5af9456b6ed19227a20 1 parent 0fe8a52
schnell authored
View
8 MediaCours.py
@@ -2,7 +2,7 @@
#
# MediaCours (Windows AudioVideoCours client and 'standalone' version)
#
-# (c) Universite de Strasbourg 2006-2010
+# (c) Universite de Strasbourg 2006-2011
# Conception and development : francois.schnell [AT] unistra.fr
#---
# This program is free software; you can redistribute it and/or modify
@@ -1097,9 +1097,11 @@ def htmlGen():
if usage=="audio":
media="enregistrement-micro.mp3"
playerHeight="20"
+ delayMediaSlides=0
else:
media="../enregistrement-video.flv"
playerHeight="250"
+ delayMediaSlides=-3
title=workDirectory.split("\\")[-1]
htmlVars="// --- Variable generated from script\n// timecode of slides for this recording\n"\
@@ -1110,7 +1112,7 @@ def htmlGen():
file=open(workDirectory+"/recording.html",'w')
file.write(htmlBits.head)
file.write(htmlVars)
- file.write(htmlBits.tail)
+ file.write(htmlBits.tail(delayMediaSlides=delayMediaSlides))
file.close()
## copy third party script in a "thirdparty" folder
@@ -1435,7 +1437,7 @@ def about(self,evt):
text="AudioVideoCours version "+__version__+" \n\n"\
+_("Website:")+"\n\n"+\
"http://audiovideocours.u-strasbg.fr/"+"\n\n"\
- +"(c) UDS 2007-2010"
+ +"(c) UDS 2007-2011"
dialog=wx.MessageDialog(self,message=text,
style=wx.OK|wx.CANCEL|wx.ICON_INFORMATION)
dialog.ShowModal()
View
224 htmlBits.py
@@ -63,118 +63,124 @@
<script>
"""
-
-tail="""
- // a global reference to the JW Player
- var player
- var current_slide=1
- var total_slides=timecode.length
-
- function initialize(){
- document.getElementById("slide").src="screenshots/D1.jpg";
- var thumbsCode=""
- for (var i = 1; i < timecode.length+1; i++) {
- thumbsCode += "<img src='screenshots/D"+i+"-thumb.jpg' width='100' onclick='goToSlide("+i+")' onMouseOver='slideTooltip("+i+")' onMouseOut='JSFX.zoomOut(this),slideTooltipOff()' >"
+def tail(delayMediaSlides=0):
+ """ Returns HTML tails depending on arguments (delay for media/slides)"""
+ tail="""
+ // a global reference to the JW Player
+ var player
+ var current_slide=1;
+ var total_slides=timecode.length;
+ delay="""+str(delayMediaSlides)+"""; //estimated delay between encoder startup and slides
+
+ function initialize(){
+ document.getElementById("slide").src="screenshots/D1.jpg";
+ var thumbsCode=""
+ for (var i = 1; i <= timecode.length+1; i++) {
+ thumbsCode += "<img src='screenshots/D"+i+"-thumb.jpg' width='100' onclick='goToSlide("+eval(i-1)+")' onMouseOver='slideTooltip("+i+")' onMouseOut='JSFX.zoomOut(this),slideTooltipOff()' >"
+
+ }
+ document.getElementById("thumbs").innerHTML=thumbsCode;
+ <!-- document.getElementById("thumbInfo").innerHTML=title; -->
+ document.getElementById("title").innerHTML=title;
+ }
+ // will be called when the playe is ready and give us a reference to var player
+ function playerReady(obj) {
+ var id = obj['id'];
+ var version = obj['version'];
+ var client = obj['client'];
+ //alert('player '+id+' has been instantiated');
+ player = document.getElementById(id);
+ player.addModelListener("TIME","timeMonitor");
+ //player.sendEvent("PLAY");
+ };
+
+ //Each 1/10s, get time position and decide what to do
+ function timeMonitor(obj){
+ //alert(obj.position);
+ for (var i = 0; i < timecode.length; i++) {
+ if ((obj.position > (timecode[i]+delay)) && (obj.position < (timecode[i+1]+delay))){
+ document.getElementById("slide").src="screenshots/D"+(i+2)+".jpg";
+ current_slide=i+1;
+ }
+ else if (obj.position>timecode[timecode.length-1]+delay){document.getElementById("slide").src="screenshots/D"+(i+2)+".jpg";current_slide=i+1;}
+ }
+ }
+ function goToSlide(slideNumber){
+ //alert("You want slide number "+slideNumber);
+ player.sendEvent('SEEK',timecode[slideNumber-1]+delay);
+ }
+ function nextSlide()
+ {
+ if (current_slide < total_slides)
+ {
+ document.getElementById("slide").src="screenshots/D"+(current_slide+1)+".jpg";
+ try {goToSlide(current_slide+1)} catch(e) {/*pass*/}
+ current_slide ++;
+ }
}
- document.getElementById("thumbs").innerHTML=thumbsCode;
- document.getElementById("thumbInfo").innerHTML=title;
- document.getElementById("title").innerHTML=title;
- }
-
- // will be called when the playe is ready and give us a reference to var player
- function playerReady(obj) {
- var id = obj['id'];
- var version = obj['version'];
- var client = obj['client'];
- //alert('player '+id+' has been instantiated');
- player = document.getElementById(id);
- player.addModelListener("TIME","timeMonitor");
- //player.sendEvent("PLAY");
- };
-
- //Each 1/10s, get time position and decide what to do
- function timeMonitor(obj){
- //alert(obj.position);
- for (var i = 0; i < timecode.length+1; i++) {
- if ((obj.position > timecode[i]) && (obj.position < timecode[i+1])){
- document.getElementById("slide").src="screenshots/D"+(i+1)+".jpg";
- current_slide=i+1;
+ function previousSlide()
+ {
+ if (current_slide > 1)
+ {
+ document.getElementById("slide").src="screenshots/D"+(current_slide-1)+".jpg";
+ try {goToSlide(current_slide-1)} catch(e) {/*pass*/}
+ current_slide --;
+ }
}
- }
- }
- function goToSlide(slideNumber){
- //alert("You want slide number "+slideNumber);
- player.sendEvent('SEEK',timecode[slideNumber-1]);
- }
- function nextSlide()
- {
- if (current_slide < total_slides)
- {
- document.getElementById("slide").src="screenshots/D"+(current_slide+1)+".jpg";
- try {goToSlide(current_slide+1)} catch(e) {/*pass*/}
- current_slide ++;
- }
- }
- function previousSlide()
- {
- if (current_slide > 1)
- {
- document.getElementById("slide").src="screenshots/D"+(current_slide-1)+".jpg";
- try {goToSlide(current_slide-1)} catch(e) {/*pass*/}
- current_slide --;
- }
- }
- function slideTooltip(thumbHovered)
- {
- document.getElementById("thumbInfo").innerHTML="N° "+ thumbHovered +" (t="+timecode[thumbHovered-1]+" s)";
- }
- function slideTooltipOff()
- {
- document.getElementById("thumbInfo").innerHTML=title;
- }
- function hello(){
- alert("Current slide: " + current_slide);
- }
-</script>
-
-
-</head>
-<body onload="initialize()">
-<!-- <p>Warnning: doesn't work locally, needs a server (at least http://localhost in URL)</p> -->
-<!-- <h3 id="titre">Media (audio or video) :</h3> -->
-<p style="color:white; background-color: #CC0000; text-align:center;padding: 5px; border: 1px solid black; ">
-Prévisualisation des médias avant publication et mise en forme.
-Appuyez sur le bonton "publier" du logiciel client AudioVideoCours si vous souhaitez mettre en ligne cet enregistrement.</p>
-
- <div id="media">
- <!-- <embed src="player.swf" id="flashvideo" name="flashvideo" /> -->
- <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
- <script type="text/javascript">
- var jwplayer = new SWFObject("thirdparty/player.swf","flashvideo","328",playerHeight,"9","#FFFFFF");
- jwplayer.addParam("allowfullscreen","true");
- jwplayer.addParam("enablejs","true");
- jwplayer.addParam("allowscriptaccess","always");
- jwplayer.addParam("flashvars","file="+media+"&stretching=fill&autostart=true");
- jwplayer.write("media");
- </script>
- <div id="controls">
- <!-- <button type="button" onClick="hello()"> Action </button> -->
- <button type="button" onClick="previousSlide()"> << </button>
- <button type="button" onClick="nextSlide()"> >> </button>
- <p id="thumbInfo"></p>
- </div>
- <div id="description">
- </div>
- </div>
+ function slideTooltip(thumbHovered)
+ {
+ <!-- document.getElementById("thumbInfo").innerHTML="N° "+ thumbHovered +" (t="+timecode[thumbHovered-1]+" s)"; -->
+ }
+ function slideTooltipOff()
+ {
+ <!-- document.getElementById("thumbInfo").innerHTML=title; -->
+ }
+ function hello(){
+ alert("Current slide: " + current_slide);
+ }
+ </script>
- <div id="screenshots">
- <img id="slide" width="95%" src="screenshots/D1.jpg">
- </div>
+
+ </head>
+ <body onload="initialize()">
+ <!-- <p>Warnning: doesn't work locally, needs a server (at least http://localhost in URL)</p> -->
+ <!-- <h3 id="titre">Media (audio or video) :</h3> -->
+ <p style="color:white; background-color: #CC0000; text-align:center;padding: 5px; border: 1px solid black; ">
+ Prévisualisation des médias avant publication et mise en forme.
+ Appuyez sur le bonton "publier" du logiciel client AudioVideoCours si vous souhaitez mettre en ligne cet enregistrement.</p>
- <div id="thumbs">
- </div>
+ <div id="media">
+ <!-- <embed src="player.swf" id="flashvideo" name="flashvideo" /> -->
+ <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
+ <script type="text/javascript">
+ var jwplayer = new SWFObject("thirdparty/player.swf","flashvideo","328",playerHeight,"9","#FFFFFF");
+ jwplayer.addParam("allowfullscreen","true");
+ jwplayer.addParam("enablejs","true");
+ jwplayer.addParam("allowscriptaccess","always");
+ jwplayer.addParam("flashvars","file="+media+"&stretching=fill&autostart=true");
+ jwplayer.write("media");
+ </script>
+ <div id="controls">
+ <!-- <button type="button" onClick="hello()"> Action </button> -->
+ <button type="button" onClick="previousSlide()"> << </button>
+ <button type="button" onClick="nextSlide()"> >> </button>
+ <p id="thumbInfo"></p>
+ </div>
+ <div id="description">
+ </div>
+ </div>
+
+ <div id="screenshots">
+ <img id="slide" width="95%" src="screenshots/D1.jpg">
+ </div>
+
+ <div id="thumbs" style="width:90%; overflow:scroll;">
+
+ </div>
-</body>
-</html>
-"""
+
+ </body>
+ </html>
+ """
+ return tail
View
BIN  test-1-50-slides.ppt
Binary file not shown
View
2  win-installer/installeur.iss
@@ -6,7 +6,7 @@
[Setup]
AppName=audiovideocours
AppId=audiovideocours
-AppVerName=audiovideocours 1.21
+AppVerName=audiovideocours 1.22
AppVersion=1.21
AppPublisher=(C) ULP Multimedia 2006-2011
AppPublisherURL=http://audiovideocours.u-strasbg.fr/
Please sign in to comment.
Something went wrong with that request. Please try again.