🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@capgo/native-audio

Package Overview
Dependencies
Maintainers
1
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capgo/native-audio - npm Package Compare versions

Comparing version
8.3.2
to
8.3.3
+16
-4
ios/Sources/NativeAudioPlugin/Plugin.swift

@@ -15,3 +15,3 @@ import AVFoundation

public class NativeAudio: CAPPlugin, AVAudioPlayerDelegate, CAPBridgedPlugin {
private let pluginVersion: String = "8.3.2"
private let pluginVersion: String = "8.3.3"
public let identifier = "NativeAudio"

@@ -632,5 +632,17 @@ public let jsName = "NativeAudio"

// Only deactivate if no assets are playing AND no other audio is active
// This prevents interfering with VoIP calls or other audio sessions
if !hasPlayingAssets && !session.isOtherAudioPlaying && session.secondaryAudioShouldBeSilencedHint == false {
// Only deactivate if no assets are playing AND no other audio is active,
// and only when we're not in a record-capable mode (e.g. usage with CameraPreview plugin).
let isRecordCapableCategory: Bool = {
switch session.category {
case .record, .playAndRecord, .multiRoute:
return true
default:
return false
}
}()
if !hasPlayingAssets &&
!session.isOtherAudioPlaying &&
session.secondaryAudioShouldBeSilencedHint == false &&
!isRecordCapableCategory {
try self.session.setActive(false, options: .notifyOthersOnDeactivation)

@@ -637,0 +649,0 @@ }

+1
-1
{
"name": "@capgo/native-audio",
"version": "8.3.2",
"version": "8.3.3",
"description": "A native plugin for native audio engine",

@@ -5,0 +5,0 @@ "license": "MPL-2.0",