I’m trying to change the source of a video from selecting a link. So when the link is selected on the page, it will change the video overhead to the source of another video, sort of like a playlist.
This is the code for my html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Videos</title>
<link rel="stylesheet" href="VideosPage.css">
<script src="jquery-1.7.2.min.js" type="text/javascript"> </script>
<script type="text/javascript">
</script>
<video id="first_video" width="800" height="450" controls="controls" style="margin-left:380px; padding:10px; border:1px solid black;">
<source src="video.mp4" type="video.mp4" />
</video>
<br />
<a> Other Video </a>
Check out the HTML standard:
http://www.whatwg.org/specs/web-apps/current-work/#video.
There’s a couple of solutions you could use. One is loading the next video sequentially, like a playlist:
Then, making a link to change it would be as simple as (for example):