Simplified media mediaing with MediaSource (Chrome Canary only)
Download the production version or the development version.
In your web page:
<script src="dist/media.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
var media = new Media({
media: "#container",
file: "test.webm"
// Optionally...
// chunks: Number
});
// Events
[ "sourceopen", "response", "progress", "data" ].forEach(function( type ) {
media.on( type, function( data ) {
console.log( type + ": ", data );
});
});
}, false);
</script>
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!
(Nothing yet)
Copyright (c) 2012 Rick Waldron Licensed under the MIT license.