O Recorder implementa a funcionalidade de gravação de tela para o ambiente de renderização atual.
Atualmente, o Recorder funciona apenas em ambientes Android (4.3 ou superior) e iOS com OpenGL ES 3.0.
Devido à dependência do OpenGLES, todas as funções desta classe (exceto requestPermissions, incluindo o destruidor) devem ser chamadas em uma única thread que contenha um contexto OpenGLES.
Apenas Unity No Unity, se a função Multi-threaded rendering estiver ativa, a thread do script será separada da thread de renderização, impossibilitando a chamada de updateFrame na thread de renderização. Portanto, se necessário usar a gravação de tela, desative a função Multi-threaded rendering.
Para uso no Android, é necessária a declaração da permissão android.permission.RECORD_AUDIO no AndroidManifest.xml.
Para uso no iOS, é necessária a declaração da permissão NSMicrophoneUsageDescription no Info.plist.
bool easyar_Recorder_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
public static func isAvailable() -> Bool
public static bool isAvailable()
Solicita permissões do sistema necessárias para gravação de tela. Você pode usar esta função ou chamar manualmente as funções do sistema. Válido apenas em Android e iOS; noutras plataformas, invoca imediatamente o callback informando permissão concedida. Deve ser chamada na thread de UI.
void easyar_Recorder_requestPermissions(easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromPermissionStatusAndString permissionCallback)
static void requestPermissions(std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(PermissionStatus, std::string)>> permissionCallback)
public static void requestPermissions(@Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromPermissionStatusAndString permissionCallback)
companion object fun requestPermissions(callbackScheduler: CallbackScheduler, permissionCallback: FunctorOfVoidFromPermissionStatusAndString?): Unit
+ (void)requestPermissions:(easyar_CallbackScheduler *)callbackScheduler permissionCallback:(void (^)(easyar_PermissionStatus status, NSString * value))permissionCallback
public static func requestPermissions(_ callbackScheduler: CallbackScheduler, _ permissionCallback: ((PermissionStatus, String) -> Void)?) -> Void
public static void requestPermissions(CallbackScheduler callbackScheduler, Optional<Action<PermissionStatus, string>> permissionCallback)
void easyar_Recorder_create(easyar_RecorderConfiguration * config, easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromRecordStatusAndString statusCallback, easyar_Recorder * * Return)
static std::shared_ptr<Recorder> create(std::shared_ptr<RecorderConfiguration> config, std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(RecordStatus, std::string)>> statusCallback)
public static @Nonnull Recorder create(@Nonnull RecorderConfiguration config, @Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromRecordStatusAndString statusCallback)
companion object fun create(config: RecorderConfiguration, callbackScheduler: CallbackScheduler, statusCallback: FunctorOfVoidFromRecordStatusAndString?): Recorder
+ (easyar_Recorder *)create:(easyar_RecorderConfiguration *)config callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler statusCallback:(void (^)(easyar_RecordStatus status, NSString * value))statusCallback
public static func create(_ config: RecorderConfiguration, _ callbackScheduler: CallbackScheduler, _ statusCallback: ((RecordStatus, String) -> Void)?) throws -> Recorder
public static Recorder create(RecorderConfiguration config, CallbackScheduler callbackScheduler, Optional<Action<RecordStatus, string>> statusCallback)
void easyar_Recorder_updateFrame(easyar_Recorder * This, easyar_TextureId * texture, int width, int height)
void updateFrame(std::shared_ptr<TextureId> texture, int width, int height)
public void updateFrame(@Nonnull TextureId texture, int width, int height)
fun updateFrame(texture: TextureId, width: Int, height: Int): Unit
- (void)updateFrame:(easyar_TextureId *)texture width:(int)width height:(int)height
public func updateFrame(_ texture: TextureId, _ width: Int32, _ height: Int32) -> Void
public virtual void updateFrame(TextureId texture, int width, int height)