Migration Guides
To version 1.17.0
RenderBackendType(render_backend_type) was moved to types package. So,
now for:
Android
Change com.banuba.sdk.scene.RenderBackendType to
com.banuba.sdk.types.RenderBackendType.
C++
Change #include <bnb/scene/interfaces/render_backend_type.hpp>
to #include <bnb/types/interfaces/render_backend_type.hpp>
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
BanubaSdkManagerdeprecated 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 toBNBUtilityManagerfor the SDK initialization instead. - The class
Playerintroduced as a replacement for theBanubaSdkManager. Now it is the only way to process frames from theInput, manage effect playback and present them to theOutput. - The protocol
Inputwith basic use cases implementations:Camera,Photo,Stream; provides frames to thePlayerfor further processing and rendering. - The protocol
Outputimplements endpoint of the presentation surface, which may beView,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.datafrom 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)NnModewas removed. The Banuba SDK now sets this automatically. - The enum
(BNB)FaceSearchModewas removed. The Banuba SDK now sets this automatically. EffectPlayerConfigurationdoesn't have constructor withrenderModeanymore. Use constructor without parameters instead.EffectPlayerConfigurationdoesn't contain auxiliary classDefaultwith default values anymore.- Now the
EffectPlayerConfigurationdoes not have a constructor. To create an instance of this class, use the staticcreatemethod. - Now the
EffectPlayerdoesn't have static methodsversionMajor()andversionMinor(). The functionality was removed because it was not used. - Now the
EffectPlayerdoesn't have methodssetRenderTransform()andrecognizerProcessFromBuffer(). The functionality was removed because it was not used. - Now the
EffectPlayerdoesn't have methodsisDeviceNnCompatible()andsetFaceSearchMode(). Due to the fact that all operations with neural networks the Banuba SDK automatically accepts. CameraSessionTypecontains onlyFrontCameraSessionandBackCameraSessionvalues now.
Windows
- The enum
nn_modewas removed. The Banuba SDK now sets this automatically. - The enum
face_search_modewas removed. The Banuba SDK now sets this automatically. - Now the
effect_player_configurationis not a struct. To create an instance of this class, use the staticcreatemethod. - Now the
effect_playerdoesn't have static methodsversion_major()andversion_minor(). The functionality was removed because it was not used. - Now the
effect_playerdoesn't have methodsset_render_transform()andrecognizer_process_from_buffer(). The functionality was removed because it was not used. - Now the
effect_playerdoesn't have methodsis_device_nn_compatible()andset_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.setRenderTargetnow acceptsEffectPlayerView(for on-screen rendering) orCAMetalLayer(for off-screen rendering) instead ofCAEAGLLayer.EffectPlayerView.effectPlayerproperty was made private, don't use it anymore.