Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


<meta name="description" content="My Video Player">
  <meta charset="utf-8">
  <link href="" rel="stylesheet">
  <title>JS Bin</title>
  <section class="container">
   <video id="myvideo" width="480" height="270">
  <source src="" type="video/mp4">
Your browser does not support the video tag.
<div class="controlpanel"> 
  <div class="title">Control Panel</div>
  <button onclick="playVideo();"><b>Play</b></button>

<button onclick="pauseVideo();">Pause</button>
<button onclick="stopVideo();">Stop</button>
<button onclick="rewindVideo();">
  Back to beginning</button>



                body {
  background-color: white;

.container {
  margin: 0px auto;
  padding: 10px;
  width: 480px;
  background-color: indigo;
  border: 4mm ridge rgb(50, 25, 60, 0.6);

button {
  background-color: indigo;
  color: white;
  border-radius: 10%;
  box-shadow: 5px 5px 3px grey;
  padding: 10px;
  cursor: pointer;

button:hover {
  background-color: white;
  color: indigo;
  border: 0.2mm solid indigo;

.controlpanel {
  transition: all 0.8s;
  margin: 35px 15px 0px 15px;
  border: 2px solid;
  padding: 20px;
  background-color: #d2c8d6;

.controlpanel:hover {
  box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.4);
  transform: scale(1.12);

.title {
  float: left;
  padding: 3px 10px 0px 10px;
  margin: -50px 0 0 0px;
  background-color: #f2f3f4;
  font-family: "Great Vibes", cursive;
  font-size: 1.8em;
  color: indigo;
  color: indigo;
  border: 0.2mm solid indigo;



                myvideo = document.querySelector("#myvideo");
function playVideo() {;
function pauseVideo() {
function stopVideo() {
function rewindVideo() {
  myvideo.currentTime = 0;