How to make a video in a webpage using php + js?

How to make a video in a webpage using php + js ?

JS and html Code is working fine.
You need to visit "movies" were displayed on video "movie_id" and others were "hidden"

<video class=" " controls="controls" width="100%" >
<source src="https://example.com/example.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>

or show a block of html which will have a video player.

Example block:
<article class="">
<video class=" " controls="controls" width="100%" >
<source src="https://example.com/example.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>
</article>


js code 
$(function(){

$('.movie .list li').click(function(){
var movie_id = $(this).attr('data-id');
$('.trailerMovie').append('<iframe src="https://www.example.com/movies/' + movie_id + '?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>');
$('.modal_wrapper').stop().fadeIn('slow');
$('.modalBg,.trailerModal,.btn_modalClose').click( function(){
$('.modal_wrapper').stop().fadeOut('slow',function (){
$('.trailerMovie').empty();
$('.modal_wrapper').css('display','none') ;
});
});
});
});

And html code 

<div class="modal_wrapper">
<div class="modalBg"></div>
<div class="trailerModal">
<div class="btn_modalClose"><span></span></div>
<div class="trailerMovie"></div>
</div>
</div>
April 19th 20 at 12:27
0 answer

Find more questions by tags HTMLJavaScript