Skip to main content

Migration Guides

To version 1.9.0

BanubaSDK introduces the Player API for iOS and Android, which implements the most popular use cases and is highly customizable. We continue to support the old API, but starting from this version it is marked as deprecated. The main changes are described below.

iOS & Android

  • The class BanubaSdkManager deprecated now. Static methods for initialization/deinitialization of the Banuba SDK with the client token and resources path still work. But we are suggest to switch to BNBUtilityManager for the SDK initialization instead.
  • The class Player introduced as a replacement for the BanubaSdkManager. Now it is the only way to process frames from the Input, manage effect playback and present them to the Output.
  • The protocol Input with basic use cases implementations: Camera, Photo, Stream; provides frames to the Player for further processing and rendering.
  • The protocol Output implements endpoint of the presentation surface, which may be View, PixelBuffer, Video, or any other surface, implemented by own. You can have several outputs in use at a time!
  • All the three main protocols can be connected between each other through the player.use(input, outputs) method call.

More details about new Player API you can find in our github examples.

To version 1.5.0

WebAR

  • Starting from this version, Banuba WebAR is delivered as an @banuba/webar npm package. It also brings the ability to try out the Banuba WebAR SDK from a CDN of your choosing, please, see the CDN section of the @banuba/webar npm package.

  • From now on, the Player does not include any AR feature-modules like FaceTracker, Background, Hair, or Lips by default. These modules should be connected separately:

    const frx = new Module("https://cdn.jsdelivr.net/npm/@banuba/webar/dist/modules/face_tracker.zip")
    const bg = new Module("https://cdn.jsdelivr.net/npm/@banuba/webar/dist/modules/background.zip")

    await player.addModule(frx, bg)

    See the Player.addModule() reference for details. See the Module reference for the list of available modules.

    This change reduced the size of BanubaSDK.data from 31Mb+ to a little more then 100Kb and now allows to load only the AR modules required by the application.

iOS & Android

  • The enum (BNB)NnMode was removed. The Banuba SDK now sets this automatically.
  • The enum (BNB)FaceSearchMode was removed. The Banuba SDK now sets this automatically.
  • EffectPlayerConfiguration doesn't have constructor with renderMode anymore. Use constructor without parameters instead.
  • EffectPlayerConfiguration doesn't contain auxiliary class Default with default values anymore.
  • Now the EffectPlayerConfiguration does not have a constructor. To create an instance of this class, use the static create method.
  • Now the EffectPlayer doesn't have static methods versionMajor() and versionMinor(). The functionality was removed because it was not used.
  • Now the EffectPlayer doesn't have methods setRenderTransform() and recognizerProcessFromBuffer(). The functionality was removed because it was not used.
  • Now the EffectPlayer doesn't have methods isDeviceNnCompatible() and setFaceSearchMode(). Due to the fact that all operations with neural networks the Banuba SDK automatically accepts.
  • CameraSessionType contains only FrontCameraSession and BackCameraSession values now.

Windows

  • The enum nn_mode was removed. The Banuba SDK now sets this automatically.
  • The enum face_search_mode was removed. The Banuba SDK now sets this automatically.
  • Now the effect_player_configuration is not a struct. To create an instance of this class, use the static create method.
  • Now the effect_player doesn't have static methods version_major() and version_minor(). The functionality was removed because it was not used.
  • Now the effect_player doesn't have methods set_render_transform() and recognizer_process_from_buffer(). The functionality was removed because it was not used.
  • Now the effect_player doesn't have methods is_device_nn_compatible() and set_face_search_mode(). Due to the fact that all operations with neural networks the Banuba SDK automatically accepts.

To version 1.0.x

Starting from version 1.0.x and higher, we provide a new rendering engine. Effects from the previous version will not work. Please, contact Banuba to convert your effect for the new engine.

iOS

  • BanubaSdkMnager.setRenderTarget now accepts EffectPlayerView(for on-screen rendering) or CAMetalLayer (for off-screen rendering) instead of CAEAGLLayer.
  • EffectPlayerView.effectPlayer property was made private, don't use it anymore.

To version 0.30.x

One of the goals of this release was to separate the logic of working with effects. Methods of EffectPlayer that were moved to the new EffectManager and Effect classes:

  • add_error_listener was moved to the EffectManager
  • remove_error_listener was moved to the EffectManager
  • add_hint_listener was moved to the EffectManager
  • remove_hint_listener was moved to the EffectManager
  • add_effect_event_listener was moved to the EffectManager
  • remove_effect_event_listener was moved to the EffectManager
  • set_effect_size was moved to the EffectManager
  • load_effect was moved to the EffectManager
  • unload_effect was moved to the EffectManager
  • force_effect_reload was removed
  • get_effect_status was removed
  • call_js_method was moved to the Effect

Android

  • BanubaSdkManager.setDrawSize was removed

To version 0.29.x

iOS

A new manualAudio parameter was added to BNBEffectPlayerConfiguration. Set it to true if you wish to create the audio session manually. Otherwise use false.

Android

A new manualAudio parameter was added to EffectPlayerConfiguration. Set it to true if you wish to create the audio session manually. Otherwise use false.

To version 0.27.x

iOS

We've made BanubaSdk.framework (written in Swift) callable from Objective-C just adding @objc attribute to each public function and making classes extend from NSObject. In most cases you need nothing to do with your code, but good to mention this change.

To version 0.21.x

One of the goals of this release was to get rid of singletons both for BanubaSdkManager and EffectPlayer. Now you can create multiple instances of the classes (however, resources aren't shared yet).

Android

  • BanubaSdkManager.createInstance, BanubaSdkManager.getInstance and BanubaSdkManager.destroyInstance were removed. Instead intialize SDK with call to BanubaSdkManager.initialize and create an instanse of BanubaSdkManager.

  • effectsResourcesPaths argument was removed from BanubaSdkManager construction. Use second argument of BanubaSdkManager.initialize instead.

  • Whenever you need BanubaSdkManager, just create a class field to access it.

  • BanubaSdkTouchListener requires EffectPlayer as an argument in constructor.

  • Refer MainActivity as an example.

iOS

  • The instance property was removed in BanubaSdkManager. Instead intialize SDK with call to BanubaSdkManager.initialize, next create and hold a reference to BanubaSdkManager in a view controller or an application.

  • voiceChanger, outputService are optional now (to reflect the state of BanubaSdkManager while BNBEffectPlayer isn't created). Correct nullabity access to these properties.

  • Pass a reference to BNBEffectPlayer in EffectPlayerView.

  • Refer ViewController as an example.