Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var mediaSource = new MediaSource();
mediaSource.addEventListener('sourceopen', function (data) {
    console.log('media source opened', data);
});
console.log('script started');
setTimeout(function () {
    console.log('timeout callback executed');
    var audioElement = new Audio();
    audioElement.src = URL.createObjectURL(mediaSource);
    console.log('audio element attached to media source');
}, 5000);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers