mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-14 18:03:57 +00:00
fix(player): add a setSource
This commit is contained in:
+3
-3
@@ -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");
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ namespace margelo::nitro::omni {
|
||||
|
||||
public:
|
||||
// Methods
|
||||
void setSource(const std::optional<Source>& src) override;
|
||||
void setSource(const std::optional<Source>& source) override;
|
||||
void play() override;
|
||||
void pause() override;
|
||||
void seekBy(double offset) override;
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ abstract class HybridOmniPlayerSpec: HybridObject() {
|
||||
// Methods
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
abstract fun setSource(src: Source?): Unit
|
||||
abstract fun setSource(source: Source?): Unit
|
||||
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
|
||||
Reference in New Issue
Block a user