html5 - How to play two consistently video in html? -


In my requirement Hi I want to play two videos one by one. I am using this code for it that I want to play them continuously.

  & lt; Html & gt; & Lt; Div class = "video_player" & gt; & Lt; Width of video = "100%" height = "auto" id = "video" control & gt; & Lt; Source src = "& lt;% = videoPath1%>" Type = "video / mp34" /> & Lt; Source src = "& lt;% = videoPath2%>" Type = "video / mp34" /> & Lt; / Video & gt; & Lt; / Div & gt; & Lt; / Html & gt;   

But this is not working, can someone suggest me?

First of all, you should only list the first video. The ability to do several listings is to adjust different formats because different browsers support different formats.

Add some javascript to answer another "closing" event. Inside the video tag, addended = "swapVideos ();", your Javascript function is called swap video ().

In the SwapVideos () function,

  1. Find
  2. Get the source element
  3. Change the src value to the other video
  4. Release the load command against the video object

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -