Part of layout from sample app (activity_camera.xml):
<FrameLayout android:id="@+id/cameraView" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#0d0d0d"> <com.wowza.gocoder.sdk.api.devices.WZCameraView android:id="@+id/cameraPreview" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" wowza:defaultCamera="back" wowza:frameSizePreset="frameSize1280x720" wowza:scaleMode="fill" /> </FrameLayout>
and in this case all works right, ok…
but I need to set custom camera preview size.
If I set size of WZCameraView to
then I got error:
W/b: a was in an unexpected state. Expected: READY, Actual: IDLE E/b: A broadcast component reported the following error during the START_BROADCAST transition severity : ERROR error class : WZStreamingError error code : 33 description : A session component was in an invalid transition state W/WZBroadcast: Ending the broadcast session due to an error that occurred during the READY to RUNNING transition W/b: a was not running at broadcast teardown. It was in a IDLE state
this error may be workarounded - I can set size for “@+id/cameraView” (parent FrameLayout), not “@+id/cameraPreview”. But this works only in sample app.
In my real application with custom layout I still get “invalid transition state” error.
Is there any way to use WZCameraView with custom size and in “not-sample-app-like” layouts?