UNPKG

media-recorder-js

Version:
106 lines (72 loc) 6.41 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Home - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="QBMediaRecorder.html">QBMediaRecorder</a><ul class='methods'><li data-type='method'><a href="QBMediaRecorder.html#toggleMimeType">toggleMimeType</a></li><li data-type='method'><a href="QBMediaRecorder.html#.isAvailable">isAvailable</a></li><li data-type='method'><a href="QBMediaRecorder.html#.isAudioContext">isAudioContext</a></li><li data-type='method'><a href="QBMediaRecorder.html#.isTypeSupported">isTypeSupported</a></li><li data-type='method'><a href="QBMediaRecorder.html#.getSupportedMimeTypes">getSupportedMimeTypes</a></li><li data-type='method'><a href="QBMediaRecorder.html#getState">getState</a></li><li data-type='method'><a href="QBMediaRecorder.html#start">start</a></li><li data-type='method'><a href="QBMediaRecorder.html#stop">stop</a></li><li data-type='method'><a href="QBMediaRecorder.html#pause">pause</a></li><li data-type='method'><a href="QBMediaRecorder.html#resume">resume</a></li><li data-type='method'><a href="QBMediaRecorder.html#change">change</a></li><li data-type='method'><a href="QBMediaRecorder.html#download">download</a></li></ul></li></ul> </nav> <div id="main"> <section class="readme"> <article><p><img src="https://raw.githubusercontent.com/QuickBlox/javascript-media-recorder/master/logo.png" alt="Logo of QBMediaRecorderJS"></p> <h1>QBMediaRecorderJS</h1><blockquote> <p>The QBMediaRecorder.js is a JavaScript library providing stream object (representing a flux of audio- or video-related data) recording and extending the <a href="https://w3c.github.io/mediacapture-record/MediaRecorder.html">MediaStream Recording API</a>.</p> </blockquote> <p><a href="https://www.npmjs.com/package/media-recorder-js"><img src="https://img.shields.io/npm/v/media-recorder-js.svg" alt="npm"></a><br><a href="https://www.npmjs.com/package/media-recorder-js"><img src="https://img.shields.io/github/stars/QuickBlox/javascript-media-recorder.svg" alt="npm"></a></p> <p>QBMediaRecorder.js support all native mimetypes and 'audio/wav' and 'audio/mp3'.<br>For support <strong>wav</strong> and <strong>mp3</strong> add <a href="https://github.com/QuickBlox/javascript-media-recorder/blob/master/qbAudioRecorderWorker.js">qbAudioRecorderWorker.js</a> to your project and set custom mimeType and workerPath in QBMediaRecorder's options:</p> <pre class="prettyprint source lang-javascript"><code>var opts = { // use named function onstart: function onStart() { console.log('Recorder is started'); }, onstop: function onStop(Blob) { videoElement.src = URL.createObjectURL(blob); }, // 'audio/wav' or 'audio/mp3' mimeType: 'audio/mp3', // set relative path (from folder node_modules for example) workerPath: '../node_modules/javascript-media-recorder/qbAudioRecorderWorker.js' }; // uses as global variable, QBMediaRecorder is built as a UMD module. var recorder = new QBMediaRecorder(opts);</code></pre><p>Extendings methods of MediaRecorder:</p> <ul> <li><a href="https://quickblox.github.io/javascript-media-recorder/docs/QBMediaRecorder.html#.isAvailable">isAvailable</a>;</li> <li><a href="https://quickblox.github.io/javascript-media-recorder/docs/QBMediaRecorder.html#.getSupportedMimeTypes">getSupportedMimeTypes</a>;</li> <li><a href="https://quickblox.github.io/javascript-media-recorder/docs/QBMediaRecorder.html#change">change</a>;</li> <li><a href="https://quickblox.github.io/javascript-media-recorder/docs/QBMediaRecorder.html#download">download</a>.</li> </ul> <p>See <a href="https://quickblox.github.io/javascript-media-recorder/docs/">docs</a> - all public API.<br>Check our <a href="https://quickblox.github.io/javascript-media-recorder/sample/">sample</a>, use a few source (video / audio).</p> <h3>Support</h3><p>The QBMediaRecorder supports <strong>Firefox 29</strong>, <strong>Chrome 49</strong> / <strong>Chrome 62 for Android</strong>, <strong>Opera 36</strong> and <strong>Safari 6.1</strong> (only <strong>wav</strong> and <strong>mp3</strong>)</p> <h3>Usage</h3><p>The QBMediaRecorder is built as a UMD module and can be loaded via CDN, NPM, or from source.</p> <h4>Install</h4><p>You can use CDN (by <a href="https://unpkg.com">UNPKG</a>) to deliver the QBMediaRecorder.</p> <pre class="prettyprint source lang-html"><code>&lt;script src='https://unpkg.com/media-recorder-js/mediaRecorder.js'>&lt;/script></code></pre><p>Or use NPM</p> <pre class="prettyprint source lang-bash"><code>npm install media-recorder-js --save</code></pre><p>Also you can download sources from <a href="https://github.com/QuickBlox/javascript-media-recorder">Github</a>, run project by the following commands.<br>You will need to have <a href="http://gulpjs.com/">Gulp</a>.</p> <pre class="prettyprint source lang-bash"><code>npm i npm run build</code></pre><h4>Contribution</h4><p><a href="https://github.com/eslint/eslint">ESLint</a> uses in project as lint, so install it before start developing.</p> <pre class="prettyprint source lang-bash"><code>npm install -g eslint</code></pre><h3>Related posts</h3><ul> <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder">MDN</a></li> </ul></article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Mar 09 2018 11:57:33 GMT+0200 (FLE Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>