Skip to content

Latest commit

 

History

History

Basic-Audio-Transformer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

OpenTok.js Basic Audio Transformer

This sample application shows how to use a basic transformer with the Vonage Video APIs. It is very similar to the Basic Video Chat example but it adds transformer.js, worker-media-processor.js, and worker.js files which create an audio transformer, a web worker, and a separate thread for the web worker publishing a transformed audio stream that publishes the audio below the cutoff value of 100Hz.

Demo

Open in StackBlitz

Enter your credentials in config.js and the application will work.

Note: There is a devDependency sirv-cli in the project that is only necessary to run the demo on StackBlitz.

Running the App

Important: Read the following sections of the main README file for the repository to set up and test the application:

Transforming the Audio Stream

After connecting to the session, and publishing the audio-video stream, transform the audio stream.

session.publish(publisher, () => transformStream(publisher));

Known Limitations

  • MediaProcessors are only supported in recent versions of Chrome, Electron, Opera, and Edge. They are not supported in other (non-Chromium-based) browsers or on iOS. You can check if the client supports this feature by calling the OT.hasMediaProcessorSupport() method.