It is not displaying video players for all existing videos

ぐ巨炮叔叔 提交于 2019-12-24 17:50:04

问题


What is happening is lets say I have 2 questions which I access through a loop and question 1 has two videos and question 2 has a video, it displays the 2 videos for question 1 but for question 2 it does not display a video, it just displays Loading video player .... How can I get the video to be displayed for question 2 as well as question one?

Below is code:

<?php

foreach ($arrQuestionId as $key=>$question) {


                //start:procedure video
        $vid_result = '';
        if(empty($arrVideoFile[$key])){
          $vid_result = '&nbsp;';
        }else{

            ?>

  <p>
<?php 
$i = 0;
foreach ($arrVideoFile[$key] as $v) { ?>
<div id="myElement-<?php echo $i; ?>">Loading the player...

<script type="text/javascript">


jwplayer("myElement-<?php echo $i; ?>").setup({
    file: "<?php echo 'VideoFiles/'.$v; ?>"
});

<?php $i++; ?>
</script>

</div>
<?php } ?>
</p>

<?php           
        }

}
?>

来源:https://stackoverflow.com/questions/14764584/it-is-not-displaying-video-players-for-all-existing-videos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!