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 5var stream; 6 7function success(s) { 8 stream = s; 9 common.naclModule.postMessage({track: stream.getAudioTracks()[0]}); 10} 11 12function failure(e) { 13 common.logMessage("Error: " + e); 14} 15 16function moduleDidLoad() { 17 navigator.webkitGetUserMedia({'audio': true}, success, failure); 18} 19