[Update]优化全览模式摄像头呈现和播放
This commit is contained in:
@@ -164,10 +164,10 @@ import java.util.*
|
||||
}
|
||||
}
|
||||
|
||||
/*ivCameraIcon?.setOnLongClickListener {
|
||||
activity?.let { it1 -> CarcorderPreviewView.show(it1) }
|
||||
ivCameraIcon?.setOnLongClickListener {
|
||||
showSmallFragment()
|
||||
true
|
||||
}*/
|
||||
}
|
||||
|
||||
ivToolsIcon?.setOnClickListener {
|
||||
if (toolsViewFloat == null) {
|
||||
|
||||
@@ -40,10 +40,13 @@ class RoadVideoDialog(context: Context) : BaseFloatDialog(context), LifecycleObs
|
||||
|
||||
init {
|
||||
setContentView(R.layout.road_video_dialog)
|
||||
roadVideoPB.indeterminateDrawable.colorFilter = PorterDuffColorFilter(
|
||||
ContextCompat.getColor(context, R.color.notice_blue),
|
||||
PorterDuff.Mode.MULTIPLY
|
||||
)
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
roadVideoClose.setOnClickListener {
|
||||
stopLive()
|
||||
dismiss()
|
||||
}
|
||||
|
||||
@@ -52,12 +55,14 @@ class RoadVideoDialog(context: Context) : BaseFloatDialog(context), LifecycleObs
|
||||
|
||||
fun show(url: String, isFlvUrl: Boolean) {
|
||||
show()
|
||||
roadVideoPB.visibility = View.VISIBLE
|
||||
if (!isFlvUrl) {
|
||||
// 打开指定ip的摄像头直播流
|
||||
CallerMonitorManager.openCameraStream(url, { flvUrl ->
|
||||
gsyVideoPlay(flvUrl)
|
||||
}) {
|
||||
ToastUtils.showShort(it.message)
|
||||
dismiss()
|
||||
}
|
||||
} else {
|
||||
gsyVideoPlay(url)
|
||||
@@ -93,10 +98,6 @@ class RoadVideoDialog(context: Context) : BaseFloatDialog(context), LifecycleObs
|
||||
}
|
||||
}
|
||||
})
|
||||
roadVideoPB.indeterminateDrawable.colorFilter = PorterDuffColorFilter(
|
||||
ContextCompat.getColor(context, R.color.notice_blue),
|
||||
PorterDuff.Mode.MULTIPLY
|
||||
)
|
||||
}
|
||||
|
||||
private fun gsyVideoPlay(flvUrl: String) {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main.stagetwo;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.test.crashreport.CrashReportConstants;
|
||||
import com.mogo.test.crashreport.upgrade.UpgradeReportConstants;
|
||||
import com.rousetime.android_startup.AndroidStartup;
|
||||
|
||||
public class APMStartup extends AndroidStartup<Boolean> {
|
||||
@Nullable
|
||||
@Override
|
||||
public Boolean create(@NonNull Context context) {
|
||||
// bugly
|
||||
ARouter.getInstance().build(UpgradeReportConstants.PATH).navigation();
|
||||
// apm
|
||||
ARouter.getInstance().build(CrashReportConstants.PATH).navigation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean callCreateOnMainThread() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean waitOnMainThread() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
@@ -7,6 +7,7 @@
|
||||
android:minWidth="1736px"
|
||||
android:minHeight="974px"
|
||||
app:roundLayoutRadius="30px"
|
||||
android:background="@drawable/road_video_bg"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
|
||||
Reference in New Issue
Block a user