Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jimukgb authored Dec 5, 2024
1 parent 33d3d65 commit e982954
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
<script>
function play()
{
document.getElementById("player").innerHTML = "<video controls><source src='" +
document.getElementById("player").children[0].value + "'></video>"
document.getElementById("player").innerHTML =
(
document.getElementById("player").children[0].nodeName=="TEXTAREA"?
"<video controls><source src='" + document.getElementById("player").children[0].value + "'></video>":
"<textarea></textarea>"
);
}
</script>
<style>
Expand All @@ -26,7 +30,7 @@
<div id="player"><textarea></textarea></div>
<br><br><br>
<div>
<button onclick="play()">Play</button>
<button onclick="play()">PLAY</button>
</div>
</body>
</html>

0 comments on commit e982954

Please sign in to comment.