/// <summary> /// Disposes the instance. WARNING: Calling this method will /// also dispose the dependencies passed to it in the constructor. /// Be mindful of this if you're sharing dependencies between multiple /// instances and/or using them outside this instance. /// </summary> public void Dispose() { AudioInput.Dispose(); RemoveAllPeers(); PeerSettings.Clear(); PeerOutputs.Clear(); Network.Dispose(); }
public void StopRecording() { // Stop the recording inputs if (recordMicrophone) { StopMicrophone(); audioInput.Dispose(); } cameraInput.Dispose(); // Stop recording videoRecorder.Dispose(); }
public async void StopRecording() { // Mute microphone microphoneSource.mute = true; // Stop recording audioInput.Dispose(); var path = await recorder.FinishWriting(); // Playback recording Debug.Log($"Saved recording to: {path}"); Handheld.PlayFullScreenMovie($"file://{path}"); }
public async void StopVideoRecording() { // Mute microphone microphoneSource.mute = true; // Stop recording audioInput?.Dispose(); cameraInput.Dispose(); var path = await recorder.FinishWriting(); // Log event and send a message to Flutter Debug.Log($"Saved recording to: {path}"); UnityMessageManager.Instance.SendMessageToFlutter(path); }
private async Task FinishRecording() { if (!isVideoRecording || isFinishWriting) { return; } // Mute microphone microphoneSource.mute = true; // Stop the microphone if we used it for recording if (recordMicrophoneAudio) { StopMicrophone(); audioInput.Dispose(); audioInput = null; } if (fpsMonitor != null) { fpsMonitor.consoleText = "FinishWriting..."; } // Stop recording isFinishWriting = true; try { var path = await videoRecorder.FinishWriting(); videoPath = path; Debug.Log("Saved recording to: " + videoPath); savePathInputField.text = videoPath; } catch (ApplicationException e) { Debug.Log(e.Message); savePathInputField.text = e.Message; } isFinishWriting = false; if (fpsMonitor != null) { fpsMonitor.consoleText = ""; } ShowAllVideoUI(); recordVideoButton.GetComponentInChildren <UnityEngine.UI.Text>().color = Color.black; isVideoRecording = false; }
public async void StopRecording() { // Mute microphone microphoneSource.mute = true; // Stop recording audioInput?.Dispose(); cameraInput.Dispose(); var path = await recorder.FinishWriting(); // Playback recording Debug.Log($"Saved recording to: {path}"); var prefix = Application.platform == RuntimePlatform.IPhonePlayer ? "file://" : ""; // Handheld.PlayFullScreenMovie($"{prefix}{path}"); }
public CustomYieldInstruction Stop() { // Stop the recording inputs if (recordMicrophone) { StopMicrophone(); audioInput.Dispose(); } cameraInput.Dispose(); // Stop recording videoRecorder.Dispose(); return(this); }
public async void StopRecording() { if (microphoneActive) { StopMicrophone(); audioInput?.Dispose(); } cameraInput?.Dispose(); string videoPath = await mediaRecorder.FinishWriting(); OnRecordingFinished(videoPath); }
public void StopRecording() { _record = false; _mediaRecorder.Dispose(); _cameraInput.Dispose(); _audioInput.Dispose(); if (_coroutine != null) { StopCoroutine(_coroutine); } _mainCanvas.gameObject.SetActive(true); _recordCanvas.gameObject.SetActive(false); AudioPeerService.Stop(); }
public void StopRecordVedio() { CancelInvoke("StopRecordVedio"); if (isStartRecording) { StopMicrophone(); if (recordMicrophone) { microphoneSource.mute = true; } audioInput?.Dispose(); cameraInput.Dispose(); videoRecorder.Dispose(); } }
public void StopRecording() { Debug.Log("StopRecording------"); isRecording = false; // Stop the recording inputs if (recordMicrophone) { StopMicrophone(); audioInput.Dispose(); } cameraInput.Dispose(); // Stop recording videoRecorder.Dispose(); //Mvc.MvcTool.sendNotice(MessageKeys.ChangeRecState,isRecording); }
public async void StopRecording() { if (IsRecording) { // Mute microphone //microphoneSource.mute = true; // Stop recording audioInput?.Dispose(); cameraInput.Dispose(); var path = await videoRecorder.FinishWriting(); // Playback recording Debug.Log($"Saved recording to: {path}"); _path = path; var prefix = Application.platform == RuntimePlatform.IPhonePlayer ? "file://" : ""; } IsRecording = false; }
public async void StopRecording() { // Mute microphone microphoneSource.mute = true; // Stop recording audioInput?.Dispose(); cameraInput.Dispose(); var path = await recorder.FinishWriting(); // Playback recording Debug.Log($"Saved recording to: {path}"); var prefix = Application.platform == RuntimePlatform.IPhonePlayer ? "file://" : ""; #if UNITY_EDITOR EditorUtility.OpenWithDefaultApp(path); #elif UNITY_IOS Handheld.PlayFullScreenMovie("file://" + path); #elif UNITY_ANDROID Handheld.PlayFullScreenMovie(path); #endif // 移动端,录频完后,播放录制的视频 //Handheld.PlayFullScreenMovie($"{prefix}{path}"); }