Skip to content

Commit

Permalink
Merge pull request #57 from MJLblabla/dev
Browse files Browse the repository at this point in the history
优化商品标签为空的显示问题
  • Loading branch information
MJLblabla authored Jan 9, 2023
2 parents 409ebaa + f9654e6 commit 3a70818
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 14 deletions.
Binary file modified app-sdk/qlive-sdk-uikit/qlive-uikit-1.0.6.aar
Binary file not shown.
Binary file modified app-sdk/qlive-sdk/qlive-sdk-1.0.6.aar
Binary file not shown.
20 changes: 20 additions & 0 deletions app/debug/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qlive.qnlivekit",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 0,
"versionName": "",
"outputFile": "app-debug.apk"
}
],
"elementType": "File"
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class QMediaPlayer(val context: Context) : QIPlayer {
(mRenderView as QPlayerTextureRenderView).stopPlayback()
}
mSurface = null
mIMediaPlayer = null
}

//切换rtc模式为了下麦快速恢复保持链接
Expand All @@ -64,6 +65,9 @@ class QMediaPlayer(val context: Context) : QIPlayer {
}

override fun start() {
if (mIMediaPlayer == null) {
return
}
QLiveLogUtil.d(
"mIMediaPlayer",
"start ${mIMediaPlayer?.isPlaying} ${mIMediaPlayer?.dataSource == currentUrl} ${mIMediaPlayer?.playerState?.name}"
Expand All @@ -73,9 +77,7 @@ class QMediaPlayer(val context: Context) : QIPlayer {
) {
return
}
if (mIMediaPlayer == null) {
return
}

if (mIMediaPlayer?.playerState == PlayerState.ERROR) {
mIMediaPlayer?.release()
resetPlayer()
Expand Down Expand Up @@ -126,7 +128,7 @@ class QMediaPlayer(val context: Context) : QIPlayer {
mIMediaPlayer?.start()
}

fun setVolume(leftVolume: Float, rightVolume: Float){
fun setVolume(leftVolume: Float, rightVolume: Float) {
mIMediaPlayer?.setVolume(leftVolume, rightVolume)
}

Expand Down Expand Up @@ -209,8 +211,8 @@ class QMediaPlayer(val context: Context) : QIPlayer {

private val mPLOnVideoFrameListener = PLOnVideoFrameListener { bytes, size, w, h, format, ts ->
val sei = SEIUtil.parseSEI(bytes, size, w, h, format)
if(sei.isNotEmpty()){
mQPlayerSEIListener.onSEI(sei)
if (sei.isNotEmpty()) {
mQPlayerSEIListener.onSEI(sei)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import com.qlive.uikitcore.view.CircleImageView
import java.lang.reflect.InvocationTargetException
import java.lang.reflect.ParameterizedType


abstract class QKitFrameLayout : FrameLayout, QLiveComponent {
override var client: QLiveClient? = null
override var roomInfo: QLiveRoomInfo? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class PlayerShoppingDialog(
helper: QRecyclerViewBindHolder<KitItemPlayerGoodsBinding>,
item: QItem
) {

Glide.with(mContext)
.load(item.thumbnail)
.into(helper.binding.ivCover)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ class TagItem {
fun strToTagItem(tagStr: String): List<TagItem> {
val tags = ArrayList<TagItem>()
tagStr.split(",").forEachIndexed { index, s ->
val item = TagItem()
item.tagStr = s
when (index) {
0 -> item.color = R.drawable.shape_fa8c15_fbad14_1
1 -> item.color = R.drawable.shape_ef4149_1
else -> item.color = R.drawable.shape_fa8c15_fbad14_1
if(s.isNotEmpty()){
val item = TagItem()
item.tagStr = s
when (index) {
0 -> item.color = R.drawable.shape_fa8c15_fbad14_1
1 -> item.color = R.drawable.shape_ef4149_1
else -> item.color = R.drawable.shape_fa8c15_fbad14_1
}
tags.add(item)
}
tags.add(item)
}
return tags
}
Expand Down

0 comments on commit 3a70818

Please sign in to comment.