integration/js/mashupcore.js
changeset 143 3a2f9993c6cb
parent 141 f1b68efb360a
child 149 f2daa65fcab6
equal deleted inserted replaced
142:b1b624f81f22 143:3a2f9993c6cb
   307         var videourl = media.video;
   307         var videourl = media.video;
   308         if (typeof IriSP.video_url_transform === "function") {
   308         if (typeof IriSP.video_url_transform === "function") {
   309             videourl = IriSP.video_url_transform(media.video);
   309             videourl = IriSP.video_url_transform(media.video);
   310         }
   310         }
   311         var videoid = "video_" + media.id,
   311         var videoid = "video_" + media.id,
   312             videoEl = $('<video>'),
       
   313             width = $(".video").width(),
   312             width = $(".video").width(),
   314             height = $(".video").height(),
   313             height = $(".video").height(),
   315             mp4_file = videourl.replace(/\.webm$/i,'.mp4'),
   314             mp4_file = videourl.replace(/\.webm$/i,'.mp4'),
   316             webm_file = videourl.replace(/\.mp4$/i,'.webm'),
   315             webm_file = videourl.replace(/\.mp4$/i,'.webm'),
   317             videourl = (can_play_mp4 ? mp4_file : webm_file);
   316             videourl = (can_play_mp4 ? mp4_file : webm_file);
   467         
   466         
   468         media.on("loadedmetadata", function() {
   467         media.on("loadedmetadata", function() {
   469             if (media === currentMedia) {
   468             if (media === currentMedia) {
   470                 seekdiv.hide();
   469                 seekdiv.hide();
   471             }
   470             }
   472             mashup.checkLoaded();
   471             if (mashup === currentMedia && media === mashup.currentMedia) {
       
   472                 changeCurrentAnnotation();
       
   473             }
   473         });
   474         });
   474         
   475         
   475         media.on("play", function() {
   476         media.on("play", function() {
   476             if (media === currentMedia) {
   477             if (media === currentMedia) {
   477                 onCurrentMediaPlay();
   478                 onCurrentMediaPlay();
   662             media.show();
   663             media.show();
   663             if (!currentMedia.loaded) {
   664             if (!currentMedia.loaded) {
   664                 seekdiv.show();
   665                 seekdiv.show();
   665             }
   666             }
   666         }
   667         }
   667         if (currentMedia.elementType === "mashup") {
       
   668             mashup.checkLoaded();
       
   669         }
       
   670         $(".Ldt-Ctrl-Time-Total").text(currentMedia.duration.toString());
   668         $(".Ldt-Ctrl-Time-Total").text(currentMedia.duration.toString());
   671         currentMedia.trigger("timeupdate",currentMedia.getCurrentTime());
   669         currentMedia.trigger("timeupdate",currentMedia.getCurrentTime());
   672         currentMedia.trigger("pause");
   670         currentMedia.trigger("pause");
   673     });
   671     });
   674     
   672