Skip to content

Commit

Permalink
update for android example.
Browse files Browse the repository at this point in the history
  • Loading branch information
bustardcelly committed Apr 10, 2018
1 parent 7205fb2 commit 181d534
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ public enum Commands {
UNPUBLISH("unpublish", 4),
SWAP_CAMERA("swapCamera", 5),
UPDATE_SCALE_MODE("updateScaleMode", 6),
PREVIEW("preview", 7),
UPDATE_SCALE_SIZE("updateScaleSize", 8);
UPDATE_SCALE_SIZE("updateScaleSize", 7);

private final String mName;
private final int mValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public class R5VideoViewManager extends SimpleViewManager<R5VideoViewLayout> {
private static final int COMMAND_UNPUBLISH = 4;
private static final int COMMAND_SWAP_CAMERA = 5;
private static final int COMMAND_UPDATE_SCALE_MODE = 6;
private static final int COMMAND_PREVIEW = 7;
private static final int COMMAND_UPDATE_SCALE_SIZE = 8;
private static final int COMMAND_UPDATE_SCALE_SIZE = 7;

private R5VideoViewLayout mView;
private ThemedReactContext mContext;
Expand Down Expand Up @@ -77,9 +76,6 @@ public void receiveCommand(final R5VideoViewLayout root, int commandId, @Nullabl
int screenHeight = args.getInt(3);
root.updateScaleSize(updateWidth, updateHeight, screenWidth, screenHeight);
break;
case COMMAND_PREVIEW:
root.setupPublisher(true);
break;
case COMMAND_SUBSCRIBE:

int w = root.getWidth();
Expand Down
9 changes: 9 additions & 0 deletions example/android/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.3.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.3.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.3.1/jars" />
Expand All @@ -87,11 +90,17 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.3.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.3.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
4 changes: 0 additions & 4 deletions src/commands/R5VideoView.commands.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export const unsubscribe = (handle) => {
UIManager.dispatchViewManagerCommand(handle, Commands.unsubscribe, [])
}

export const preview = (handle) => {
UIManager.dispatchViewManagerCommand(handle, Commands.preview, [])
}

export const publish = (handle, streamName, streamType = R5PublishType.LIVE) => {
UIManager.dispatchViewManagerCommand(handle, Commands.publish, [streamName, streamType])
}
Expand Down
1 change: 0 additions & 1 deletion src/commands/R5VideoView.commands.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const { R5VideoViewManager } = NativeModules

export const subscribe = (handle, streamName) => R5VideoViewManager.subscribe(streamName)
export const unsubscribe = (handle) => R5VideoViewManager.unsubscribe()
export const preview = (handle) => R5VideoViewManager.preview()
export const publish = (handle, streamName, streamType = R5PublishType.LIVE) => R5VideoViewManager.publish(streamName, streamType)
export const unpublish = (handle) => R5VideoViewManager.unpublish()
export const swapCamera = (handle) => R5VideoViewManager.swapCamera()
Expand Down

0 comments on commit 181d534

Please sign in to comment.