Browse Source

1.添加腾讯IM

王鹏鹏 2 years ago
parent
commit
79bff4c8cb

+ 2 - 16
livebroadcast/src/main/java/com/yingyang/livebroadcast/activity/detail/LiveBroadcastActivity.kt

@@ -53,7 +53,6 @@ class LiveBroadcastActivity :
     }
 
     override fun initData() {
-
     }
 
     /**
@@ -67,11 +66,11 @@ class LiveBroadcastActivity :
                 player: V2TXLivePlayer?,
                 code: Int, msg: String?, extraInfo: Bundle?
             ) {
-                Log.d(TAG, "[Player] onError: player-$player code-$code msg-$msg info-$extraInfo")
+                CrashReport.postCatchedException(Throwable("直播报错        ----->      [Player] onError: player-$player code-$code msg-$msg info-$extraInfo"))
             }
 
             override fun onVideoLoading(player: V2TXLivePlayer?, extraInfo: Bundle?) {
-                Log.i(TAG, "[Player] onVideoLoading: player-$player, extraInfo-$extraInfo")
+
             }
 
             override fun onVideoPlaying(
@@ -79,10 +78,6 @@ class LiveBroadcastActivity :
                 firstPlay: Boolean,
                 extraInfo: Bundle?
             ) {
-                Log.i(
-                    TAG,
-                    "[Player] onVideoPlaying: player-$player firstPlay-$firstPlay info-$extraInfo"
-                )
             }
 
             override fun onVideoResolutionChanged(
@@ -90,10 +85,6 @@ class LiveBroadcastActivity :
                 width: Int,
                 height: Int
             ) {
-                Log.i(
-                    TAG,
-                    "[Player] onVideoResolutionChanged: player-$player width-$width height-$height"
-                )
             }
 
             override fun onWarning(
@@ -102,17 +93,12 @@ class LiveBroadcastActivity :
                 s: String,
                 bundle: Bundle?
             ) {
-                Log.d(TAG, "[Player] Override: player-$v2TXLivePlayer, i-$i, s-$s")
             }
 
             override fun onRenderVideoFrame(
                 player: V2TXLivePlayer,
                 v2TXLiveVideoFrame: V2TXLiveVideoFrame
             ) {
-                Log.d(
-                    TAG,
-                    "[Player] onRenderVideoFrame: player-$player, v2TXLiveVideoFrame-$v2TXLiveVideoFrame"
-                )
             }
         })
         val result = mLivePlayer?.startLivePlay(url)