[Android] Default prop values

This commit is contained in:
Baris Sencan 2015-11-13 14:36:15 -08:00
parent e63a004ee6
commit 6ddd157f58

View File

@ -91,22 +91,22 @@ public class ReactVideoViewManager extends SimpleViewManager<ReactVideoView> {
videoView.setResizeModeModifier(ScalableType.values()[Integer.parseInt(resizeModeOrdinalString)]); videoView.setResizeModeModifier(ScalableType.values()[Integer.parseInt(resizeModeOrdinalString)]);
} }
@ReactProp(name = PROP_REPEAT) @ReactProp(name = PROP_REPEAT, defaultBoolean = false)
public void setRepeat(final ReactVideoView videoView, final boolean repeat) { public void setRepeat(final ReactVideoView videoView, final boolean repeat) {
videoView.setRepeatModifier(repeat); videoView.setRepeatModifier(repeat);
} }
@ReactProp(name = PROP_PAUSED) @ReactProp(name = PROP_PAUSED, defaultBoolean = false)
public void setPaused(final ReactVideoView videoView, final boolean paused) { public void setPaused(final ReactVideoView videoView, final boolean paused) {
videoView.setPausedModifier(paused); videoView.setPausedModifier(paused);
} }
@ReactProp(name = PROP_MUTED) @ReactProp(name = PROP_MUTED, defaultBoolean = false)
public void setMuted(final ReactVideoView videoView, final boolean muted) { public void setMuted(final ReactVideoView videoView, final boolean muted) {
videoView.setMutedModifier(muted); videoView.setMutedModifier(muted);
} }
@ReactProp(name = PROP_VOLUME) @ReactProp(name = PROP_VOLUME, defaultFloat = 1.0f)
public void setVolume(final ReactVideoView videoView, final float volume) { public void setVolume(final ReactVideoView videoView, final float volume) {
videoView.setVolumeModifier(volume); videoView.setVolumeModifier(volume);
} }