Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Check CreateObjectURL</title>
- </head>
- <script type="text/javascript" language="javascript">
- window.URL = window.URL || window.webkitURL;
- function ChangeProperty()
- {
- var v = document.getElementById("myvideo");
- var file = document.getElementById("fileControl").files[0];
- v.setAttribute("src",window.URL.createObjectURL(file));
- }
- </script>
- <body>
- <div >
- <video id="myvideo" src="movie.ogg" controls ></video>
- <input type="file" id="fileControl" />
- <button id="btnprops" onClick="ChangeProperty()" >update</button>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment