Recorder implementa la función de grabación de pantalla para el entorno de renderización actual.
Actualmente, Recorder solo funciona en entornos Android (4.3 o posterior) y iOS con OpenGLES3.0.
Debido a la dependencia de OpenGLES, todas las funciones de esta clase (excepto requestPermissions, incluido el destructor) deben llamarse en un único hilo que contenga el contexto de OpenGLES.
Unity Only En Unity, si se utiliza la función de renderización multihilo (Multi-threadedrendering), el hilo del script se separará del hilo de renderización, y no se podrá llamar a updateFrame en el hilo de renderización. Por lo tanto, si se necesita usar la función de grabación de pantalla, se debe deshabilitar la renderización multihilo (Multi-threadedrendering).
Para usar en Android, se debe agregar la declaración de permiso android.permission.RECORD_AUDIO en AndroidManifest.xml.
Para usar en iOS, se debe agregar la declaración de permiso NSMicrophoneUsageDescription en 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 los permisos del sistema necesarios para la grabación de pantalla. Puedes elegir usar esta función o llamar a las funciones del sistema tú mismo para solicitar permisos. Solo es efectivo en plataformas Android e iOS; en otras plataformas, el comportamiento es llamar directamente a la devolución de llamada para notificar que los permisos están autorizados. Se debe llamar esta función en el hilo de la interfaz de usuario (UI thread).
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)