mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-16 02:44:51 +00:00
fix(provider): make source optional
This commit is contained in:
+2
-2
@@ -232,9 +232,9 @@ namespace margelo::nitro::omni {
|
||||
}
|
||||
|
||||
// Methods
|
||||
void JHybridOmniPlayerSpec::setSource(const Source& src) {
|
||||
void JHybridOmniPlayerSpec::setSource(const std::optional<Source>& src) {
|
||||
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JSource> /* src */)>("setSource");
|
||||
method(_javaPart, JSource::fromCpp(src));
|
||||
method(_javaPart, src.has_value() ? JSource::fromCpp(src.value()) : nullptr);
|
||||
}
|
||||
void JHybridOmniPlayerSpec::play() {
|
||||
static const auto method = _javaPart->javaClassStatic()->getMethod<void()>("play");
|
||||
|
||||
Reference in New Issue
Block a user