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,
- Find
- Get the source element
- Change the src value to the other video
- Release the load command against the video object
Comments
Post a Comment