diff --git a/screening/sinergia/sinergia/1/as/webapps/sinergia/html/index.html b/screening/sinergia/sinergia/1/as/webapps/sinergia/html/index.html index 89cf62d978e7885e55d50450df565bd7af57d548..8ef5174ed8c26a30861e32995df8ac0c91c3c9ea 100644 --- a/screening/sinergia/sinergia/1/as/webapps/sinergia/html/index.html +++ b/screening/sinergia/sinergia/1/as/webapps/sinergia/html/index.html @@ -376,16 +376,19 @@ var idForFunc = id; var urlForFun = videoListURL[i]; - $videoLink = $("<a>").click(function() { - $("#" + idForFunc).empty(); - $("#"+idForFunc).flowplayer({ - playlist: [ - [ - { mp4: urlForFun } - ] - ] - }); - + var $videoLink = $("<a>").click(function() { + if($("#" + idForFunc).html().length > 0) { + var api = $("#"+idForFunc).data("flowplayer"); + api.load(urlForFun); + } else { + $("#"+idForFunc).flowplayer({ + playlist: [ + [ + { mp4: urlForFun } + ] + ] + }); + } }).html("Video " + (i+1)); $videoList.append($videoLink);