MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / stop

Function stop

Ports/JavaScriptPort/src/main/webapp/js/fontmetrics.js:2489–2526  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2487
2488
2489 function stop() {
2490
2491 pause();
2492 if (audioInput) {
2493 if (audioInput.disconnect) {
2494 audioInput.disconnect();
2495 }
2496 audioInput = null;
2497 }
2498 if (audioNode) {
2499 if (audioNode.disconnect) {
2500 audioNode.disconnect();
2501 }
2502 audioNode = null;
2503 }
2504 if (audioCtx) {
2505 if (audioCtx.close) {
2506 audioCtx.close();
2507
2508 }
2509 audioCtx = null;
2510 }
2511
2512 if (stream) {
2513 stream.getTracks().forEach(function(track) {
2514 track.stop();
2515 });
2516 if (stream.close) {
2517 stream.close();
2518 }
2519 stream = null;
2520 }
2521
2522
2523 onComplete('');
2524
2525
2526 };
2527
2528
2529

Callers 1

naCallbackFunction · 0.70

Calls 5

pauseFunction · 0.85
disconnectMethod · 0.65
closeMethod · 0.65
forEachMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected