Home | History | Annotate | Download | only in media_stream_audio
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 var stream;
      6 
      7 function success(s) {
      8   stream = s;
      9   common.naclModule.postMessage({track: stream.getAudioTracks()[0]});
     10 }
     11 
     12 function failure(e) {
     13   common.logMessage("Error: " + e);
     14 }
     15 
     16 function moduleDidLoad() {
     17   navigator.webkitGetUserMedia({'audio': true}, success, failure);
     18 }
     19