4 Copyright 2014 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
9 <title>Media Stream Audio Example</title>
10 <script type="text/javascript">
14 function handleMessage(message) {
20 plugin.postMessage({track: stream.getAudioTracks()[0]});
27 function initialize() {
28 plugin = document.getElementById('plugin');
29 plugin.addEventListener('message', handleMessage, false);
30 navigator.webkitGetUserMedia({ 'audio': true }, success, failure);
33 document.addEventListener('DOMContentLoaded', initialize, false);
38 <h1>Pepper MediaStream Audio API Example</h1><br>
39 This example demonstrates receiving frames from an audio MediaStreamTrack and
40 rendering them in a plugin.<br>
41 <embed id="plugin" type="application/x-ppapi-example-media-stream-audio"
42 width="320" height="240"/>