1.1.1 • Published 6 months ago

@azaza72/my-extension v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

@azaza72/my-extension

Installation

Install the package using npm:

npm install @azaza72/my-extension

Usage

1. Import the Extension Class

    import { Extension } from '@azaza72/my-extension';

2. Create an Extension Instance

To use the Extension, create an instance by providing the Active Fence API key.

    const extension = new Extension('<YOUR_API_KEY>');

3. Register the Extension with AgoraRTC

To make the Extension functional, register it with AgoraRTC using the registerExtensions method.

    AgoraRTC.registerExtensions([extension]);

4. Getting a Processor from the Extension

To obtain a processor from the Extension instance, use the createProcessor method.

    const processor = extension.createProcessor();

5. Initializing Active Fence

Before using the processor, initialize Active Fence inside join method by calling the initializeActiveFence method.

    processor.initializeActiveFence('<USER_UID>', '<CHANNEL_NAME>');

6. Piping the Processor

Ensure the processor is piped to complete the setup.

    localAudioTrack?.pipe(processor).pipe(localAudioTrack.processorDestination);

Example

    import AgoraRTC from 'agora-rtc-sdk-ng';
    const extension = new Extension('<YOUR_API_KEY>');
    AgoraRTC.registerExtensions([extension]);
    const processor = extension.createProcessor();

    ## initialisation and piping must be implemented in joinChannel method of your app
    processor.initializeActiveFence('<USER_UID>', '<CHANNEL_NAME>');
    localAudioTrack?.pipe(processor).pipe(localAudioTrack.processorDestination);
1.1.1

6 months ago

1.1.0

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago