--- a/integration/js/edition.js Thu May 16 15:48:26 2013 +0200
+++ b/integration/js/edition.js Thu May 16 17:42:41 2013 +0200
@@ -3,7 +3,47 @@
var global = {
diaporama : null,
idAnnotation : null
-};
+},
+chapitres = {},
+annotations = {};
+
+//onLoad
+myProject.onLoad(function() {
+
+ $(".project-title").text(myProject.title);
+
+ myMedia = myProject.getCurrentMedia();
+
+ IriSP.htmlPlayer(
+ myMedia,
+ $(".main-video"),
+ {
+ width: 460,
+ height: 345,
+ controls: true,
+ autostart: true
+ }
+ );
+
+ myMedia.on("timeupdate", function(t) {
+
+ //curseur chapitre
+ var pos = $(".chapitre-cut-wrap").width() * t / myMedia.duration,
+ wContainer = $('.chapitre-cut-wrap').width(),
+ btnCutChapter = $('.btn-cut-chapter'),
+ wBtnCutChapter = btnCutChapter.outerWidth();
+
+ $(".indicateur-chapter").css("left",pos);
+ if(pos+wBtnCutChapter>wContainer){
+ btnCutChapter.css("left",(pos - wBtnCutChapter));
+ }else{
+ btnCutChapter.css("left",pos);
+ }
+
+ });
+
+});//myProject.onLoad
+
//modal
$(document).on('click', 'a.open-modal', function(e){
@@ -109,6 +149,7 @@
//nouveau chapitre
$('.chapter-widget').on('click', '.btn-cut-chapter', function(e){
e.preventDefault();
+
var uniqId = 'id' + (new Date()).getTime();
$.get('template.html', function(templates){
var viewChapterRow = {
@@ -261,11 +302,7 @@
});
//annotation > diaporama (spin)
-var spinParam = {
- imageBasePath :'lib/spin/img/',
- max:60,
- min:0
-};
+
//config
//CLEditor annotation > text (wysiwyg)
@@ -371,4 +408,4 @@
$('#annotation-tab a:last-child').tab('show');
-});
\ No newline at end of file
+});//ready
\ No newline at end of file