fix(player): add a setSource

This commit is contained in:
2026-07-21 19:54:24 +02:00
parent 6eb02d32cb
commit a2d5ede547
7 changed files with 14 additions and 8 deletions
+3 -3
View File
@@ -232,9 +232,9 @@ namespace margelo::nitro::omni {
}
// Methods
void JHybridOmniPlayerSpec::setSource(const std::optional<Source>& src) {
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JSource> /* src */)>("setSource");
method(_javaPart, src.has_value() ? JSource::fromCpp(src.value()) : nullptr);
void JHybridOmniPlayerSpec::setSource(const std::optional<Source>& source) {
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JSource> /* source */)>("setSource");
method(_javaPart, source.has_value() ? JSource::fromCpp(source.value()) : nullptr);
}
void JHybridOmniPlayerSpec::play() {
static const auto method = _javaPart->javaClassStatic()->getMethod<void()>("play");