Make a copy of the source, sharing the same CameraKitSourceSubscriber.
Optionally provide new device info for the copy (e.g. to change the camera type).
The new CameraKitSource
Set the resolution used to render this source.
If greater performance is required, a smaller render size may boost frame-rate. It does come at a cost, including loss of accuracy in various tracking and computer-vision algorithms (since they'll be operating on fewer pixels).
By default (i.e. if this method is never called), then the render size will match the size of the input media. Best performance can be achieved by varying the size of the input media and allowing CameraKit to render at a resolution that matches the input media -- this method should only be used if the input media resolution cannot be changed to the desired size.
It’s important to distinguish render size from display size. The size at which the output canvases are displayed on a web page is determined by the CSS of the page. It is distinct from the size at which CameraKit renders Lenses. Performance is dominated by render size, while any display scaling (using CSS) can most often be thought of as free.
The size of the Live and Capture RenderTarget is always the same.
pixels
pixels
Promise resolves when the render size has been successfully updated.
Apply a 2D transformation to the source (e.g. translation, rotation, scale).
Specifies the 3x3 matrix describing the transformation.
This general-purpose class represents a source of media for a CameraKitSession.
When an instance is passed to CameraKitSession.setSource, it will be "attached" to the session. Later it may be "detached" from the session.
Passing a CameraKitSourceSubscriber to the constructor allows callers to specify behavior that will occur when the source is attached and detached. This can be used to e.g. update the render size.
Important: Once a source has been attached to a CameraKitSession, it cannot be reattached, even if it has been detached. You must supply a new instance of CameraKitSource to CameraKitSession.setSource. If you want to reuse the existing source, you can use its CameraKitSource.copy method to create a new instance.