refactor: internal refactor for prepare new arch (#3980)
* chore(js): fix typo * refactor(js): refactor type code for codegen * refactor(js): refactor Video component - parse shutterColor value within JS - remove internal fullscreen state * chore(js): add deprecation warning comment * fix(js): fix return type * fix(js): fix import path * refactor(android): apply changed API for new arch * refactor(ios): apply changed API for new arch * fix(ios): fix wrong name * refactor: refactor VideoDecoderProperties - rename and add wrapper * refactor(android): Code fixes for backward compatibility with Kotlin
This commit is contained in:
@@ -7,7 +7,6 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.media3.common.util.Util;
|
||||
|
||||
import com.brentvatne.common.api.BufferConfig;
|
||||
import com.brentvatne.common.api.BufferingStrategy;
|
||||
@@ -203,7 +202,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_TEXT_TRACKS)
|
||||
public void setPropTextTracks(final ReactExoplayerView videoView,
|
||||
public void setTextTracks(final ReactExoplayerView videoView,
|
||||
@Nullable ReadableArray textTracks) {
|
||||
SideLoadedTextTrackList sideLoadedTextTracks = SideLoadedTextTrackList.Companion.parse(textTracks);
|
||||
videoView.setTextTracks(sideLoadedTextTracks);
|
||||
@@ -245,12 +244,12 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_MAXIMUM_BIT_RATE)
|
||||
public void setMaxBitRate(final ReactExoplayerView videoView, final int maxBitRate) {
|
||||
videoView.setMaxBitRateModifier(maxBitRate);
|
||||
public void setMaxBitRate(final ReactExoplayerView videoView, final float maxBitRate) {
|
||||
videoView.setMaxBitRateModifier((int)maxBitRate);
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_MIN_LOAD_RETRY_COUNT)
|
||||
public void minLoadRetryCount(final ReactExoplayerView videoView, final int minLoadRetryCount) {
|
||||
public void setMinLoadRetryCount(final ReactExoplayerView videoView, final int minLoadRetryCount) {
|
||||
videoView.setMinLoadRetryCountModifier(minLoadRetryCount);
|
||||
}
|
||||
|
||||
@@ -310,12 +309,11 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
videoView.setSubtitleStyle(SubtitleStyle.parse(src));
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_SHUTTER_COLOR, customType = "Color")
|
||||
public void setShutterColor(final ReactExoplayerView videoView, final Integer color) {
|
||||
videoView.setShutterColor(color == null ? Color.BLACK : color);
|
||||
@ReactProp(name = PROP_SHUTTER_COLOR, defaultInt = 0)
|
||||
public void setShutterColor(final ReactExoplayerView videoView, final int color) {
|
||||
videoView.setShutterColor(color == 0 ? Color.BLACK : color);
|
||||
}
|
||||
|
||||
|
||||
@ReactProp(name = PROP_BUFFER_CONFIG)
|
||||
public void setBufferConfig(final ReactExoplayerView videoView, @Nullable ReadableMap bufferConfig) {
|
||||
BufferConfig config = BufferConfig.parse(bufferConfig);
|
||||
|
Reference in New Issue
Block a user