feat(android): support chromecast

This commit is contained in:
2026-07-26 19:27:41 +02:00
parent 6423ed0bc5
commit 06efcbf1aa
32 changed files with 902 additions and 57 deletions
@@ -13,6 +13,8 @@ namespace margelo::nitro::omni { enum class NumberProperty; }
namespace margelo::nitro::omni { enum class BoolProperty; }
// Forward declaration of `PlayerStatus` to properly resolve imports.
namespace margelo::nitro::omni { enum class PlayerStatus; }
// Forward declaration of `CastStatus` to properly resolve imports.
namespace margelo::nitro::omni { enum class CastStatus; }
// Forward declaration of `Track` to properly resolve imports.
namespace margelo::nitro::omni { struct Track; }
// Forward declaration of `Rendition` to properly resolve imports.
@@ -29,6 +31,9 @@ namespace margelo::nitro::omni { struct Rendition; }
#include "PlayerStatus.hpp"
#include "JFunc_void_PlayerStatus.hpp"
#include "JPlayerStatus.hpp"
#include "CastStatus.hpp"
#include "JFunc_void_CastStatus.hpp"
#include "JCastStatus.hpp"
#include "JFunc_void.hpp"
#include <string>
#include "JFunc_void_std__string_std__string.hpp"
@@ -99,6 +104,14 @@ namespace margelo::nitro::omni {
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_PlayerStatus::javaobject> /* cb */)>("removePlayerStatusListener_cxx");
method(_javaPart, JFunc_void_PlayerStatus_cxx::fromCpp(cb));
}
void JHybridOmniEventMapSpec::addCastStatusListener(const std::function<void(CastStatus /* value */)>& cb) {
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_CastStatus::javaobject> /* cb */)>("addCastStatusListener_cxx");
method(_javaPart, JFunc_void_CastStatus_cxx::fromCpp(cb));
}
void JHybridOmniEventMapSpec::removeCastStatusListener(const std::function<void(CastStatus /* value */)>& cb) {
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_CastStatus::javaobject> /* cb */)>("removeCastStatusListener_cxx");
method(_javaPart, JFunc_void_CastStatus_cxx::fromCpp(cb));
}
void JHybridOmniEventMapSpec::addOnEndListener(const std::function<void()>& cb) {
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void::javaobject> /* cb */)>("addOnEndListener_cxx");
method(_javaPart, JFunc_void_cxx::fromCpp(cb));