Fix crash on one permission refused and color black on black
This commit is contained in:
parent
a8e290fc0b
commit
678e131f32
|
@ -148,10 +148,12 @@ class StreamActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
override fun surfaceDestroyed(p0: SurfaceHolder) {
|
||||
if(rtmpCamera1.isStreaming) {
|
||||
rtmpCamera1.stopStream()
|
||||
if (this@StreamActivity::rtmpCamera1.isInitialized) {
|
||||
if (rtmpCamera1.isStreaming) {
|
||||
rtmpCamera1.stopStream()
|
||||
}
|
||||
rtmpCamera1.stopPreview()
|
||||
}
|
||||
rtmpCamera1.stopPreview()
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/permission_info"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/permissions"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -33,7 +34,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:gravity="center"
|
||||
android:textColor="#0000FF"
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
<com.pedro.rtplibrary.view.OpenGlView
|
||||
android:layout_width="0dp"
|
||||
|
|
Loading…
Reference in New Issue