我有一个流程图库。现在我想要点击一个链接,我的所有视频应该在模态框弹出窗口中列出。我尝试了一切,但它不起作用。我无法弄清楚这究竟是什么问题。
当我加载没有弹出窗口的视频时它的工作正常,但当我试图将其加载到弹出窗口时。它没有任何显示。请帮助我。以下是javascript代码......
function show_samples(artist_id, language){
$("#sample-box").load("<?php echo SITE_PATH?>index.php?rt=artist/show_vo_samples", {'artist_id':artist_id, 'language':language} , function(responseTxt, statusTxt, xhr){
if(statusTxt == "success")
$('#sample-box').modal();
if(statusTxt == "error")
alert("Error: " + xhr.status + ": " + xhr.statusText);
});
}
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="../libraries/video_player/flowplayer.min.js"></script>
<div id="sample-box" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="flowplayer" data-swf="../libraries/video_player/flowplayer.swf" data-ratio="0.4167">
<video>
<source type="video/mp4" src="https://edge.flowplayer.org/bauhaus.mp4">
</video>
</div>
</div>
</div>
</div>
答案 0 :(得分:1)
function show_samples(artist_id, language){
$("#sample-box").load("<?php echo SITE_PATH?>index.php?rt=artist/show_vo_samples", {'artist_id':artist_id, 'language':language} , function(responseTxt, statusTxt, xhr){
if(statusTxt == "success")
$('#sample-box').modal();
if(statusTxt == "error")
alert("Error: " + xhr.status + ": " + xhr.statusText);
});
}
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="http://releases.flowplayer.org/js/flowplayer-3.2.12.min.js">
</script>
<div id="sample-box" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="flowplayer" data-swf="http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf" data-ratio="0.4167">
<video controls loop autoplay>
<source type="video/mp4" src="https://edge.flowplayer.org/bauhaus.mp4">
</video>
</div>
</div>
</div>
</div>