Commit 4759771f by 范玉宾

Merge branch 'd/lancet/4.3.93_muse' into 'd/4.3.93_muse'

D/lancet/4.3.93 muse

See merge request app_android_lib/YDL-Component!65
parents d7102cb8 ddadb6ad
...@@ -8,13 +8,13 @@ ext { ...@@ -8,13 +8,13 @@ ext {
"m-confide" : "0.0.49.74", "m-confide" : "0.0.49.74",
"m-consultant" : "0.0.60.25", "m-consultant" : "0.0.60.25",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.17", "m-user" : "0.0.62.18",
"m-home" : "0.0.23.65", "m-home" : "0.0.23.66",
"m-im" : "0.0.21.44", "m-im" : "0.0.21.44",
"m-dynamic" : "0.0.7.73", "m-dynamic" : "0.0.7.73",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.45", "m-muse" : "0.0.28.46",
"m-tests" : "0.0.24.18", "m-tests" : "0.0.24.18",
"m-course" : "0.0.43.37", "m-course" : "0.0.43.37",
...@@ -93,13 +93,13 @@ ext { ...@@ -93,13 +93,13 @@ ext {
"m-confide" : "0.0.49.74", "m-confide" : "0.0.49.74",
"m-consultant" : "0.0.60.25", "m-consultant" : "0.0.60.25",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.17", "m-user" : "0.0.62.18",
"m-home" : "0.0.23.65", "m-home" : "0.0.23.66",
"m-im" : "0.0.21.44", "m-im" : "0.0.21.44",
"m-dynamic" : "0.0.7.73", "m-dynamic" : "0.0.7.73",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.45", "m-muse" : "0.0.28.46",
"m-tests" : "0.0.24.18", "m-tests" : "0.0.24.18",
"m-course" : "0.0.43.37", "m-course" : "0.0.43.37",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
......
...@@ -116,9 +116,9 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv ...@@ -116,9 +116,9 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv
it?.start() it?.start()
it?.setVolume(0.0F, 0.0F) it?.setVolume(0.0F, 0.0F)
} }
video_view?.setOnCompletionListener { video_view?.start() }
video_view?.setOnCompletionListener { video_view?.start() }
bean.mditationListResponse?.forEach { bean.mditationListResponse?.forEach {
meditationTitles.add(it.comment) meditationTitles.add(it.comment)
......
...@@ -21,21 +21,19 @@ ...@@ -21,21 +21,19 @@
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:background="#999999">
<com.yidianling.home.widget.AdaptiveVideoView <com.yidianling.home.widget.AdaptiveVideoView
android:id="@+id/video_view" android:id="@+id/video_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:focusable="false" android:focusable="false"
android:focusableInTouchMode="false" /> android:focusableInTouchMode="false"/>
<!-- <ImageView--> <View
<!-- android:id="@+id/iv_video_background"--> android:layout_width="match_parent"
<!-- android:layout_width="match_parent"--> android:layout_height="match_parent"
<!-- android:layout_height="match_parent"--> android:background="#88999999"/>
<!-- android:scaleType="fitCenter"/>-->
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -16,7 +16,7 @@ class MeditationPlayModuleBean : HomeItemBaseBean { ...@@ -16,7 +16,7 @@ class MeditationPlayModuleBean : HomeItemBaseBean {
var mediaList: ArrayList<MeditationDetail>? = null var mediaList: ArrayList<MeditationDetail>? = null
data class MeditationDetail( data class MeditationDetail(
val mediaType:Int? = null, val meditationType:Int? = null,
val mediaId:Long?=null, val mediaId:Long?=null,
val meditationId:Long, val meditationId:Long,
val title:String, val title:String,
......
...@@ -8,3 +8,4 @@ class MeditationFloatEvent( ...@@ -8,3 +8,4 @@ class MeditationFloatEvent(
val time:Long?=null, val time:Long?=null,
val meditationDetail: MeditationPlayModuleBean.MeditationDetail?=null val meditationDetail: MeditationPlayModuleBean.MeditationDetail?=null
) )
...@@ -143,7 +143,6 @@ class MeditationWindowService : LifecycleService() { ...@@ -143,7 +143,6 @@ class MeditationWindowService : LifecycleService() {
} }
} }
} }
private fun updateFloatView(meditation: MeditationPlayModuleBean.MeditationDetail) { private fun updateFloatView(meditation: MeditationPlayModuleBean.MeditationDetail) {
...@@ -155,8 +154,12 @@ class MeditationWindowService : LifecycleService() { ...@@ -155,8 +154,12 @@ class MeditationWindowService : LifecycleService() {
val intent = Intent(this, PlayMeditationActivity::class.java) val intent = Intent(this, PlayMeditationActivity::class.java)
intent.putExtra("MEDIA_ID", meditation.mediaId) intent.putExtra("MEDIA_ID", meditation.mediaId)
intent.putExtra("MEDITATION_ID", meditation.meditationId) intent.putExtra("MEDITATION_ID", meditation.meditationId)
intent.putExtra("MEDITATION_TYPE", meditation.mediaType) intent.putExtra("MEDITATION_TYPE", meditation.meditationType)
intent.putExtra("MEDIA_COVER_URL", meditation.coverImageUrl) intent.putExtra("MEDIA_COVER_URL", meditation.coverImageUrl)
intent.putExtra("MEDIA_URL", meditation.mediaUrl)
intent.putExtra("BROAD_CAST_TIME",
(ivProgress?.curProcess?.div(1000.00))?.roundToInt() ?: 0)
intent.flags = FLAG_ACTIVITY_NEW_TASK intent.flags = FLAG_ACTIVITY_NEW_TASK
startActivity(intent) startActivity(intent)
} }
...@@ -279,6 +282,7 @@ class MeditationWindowService : LifecycleService() { ...@@ -279,6 +282,7 @@ class MeditationWindowService : LifecycleService() {
if (EventBus.getDefault().isRegistered(this)) { if (EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().unregister(this) EventBus.getDefault().unregister(this)
} }
mDisposable?.dispose()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
stopForeground(true) stopForeground(true)
} }
...@@ -328,7 +332,6 @@ class MeditationWindowService : LifecycleService() { ...@@ -328,7 +332,6 @@ class MeditationWindowService : LifecycleService() {
} }
private fun postPlayRecord( private fun postPlayRecord(
isQuit: Int, isQuit: Int,
playTime: Int, playTime: Int,
......
package com.yidianling.muse.utils package com.yidianling.muse.utils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.yidianling.home.http.MuseHttp
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
class MediaPlayerTimeUtil { class MediaPlayerTimeUtil {
companion object{ companion object{
...@@ -64,6 +69,29 @@ class MediaPlayerTimeUtil { ...@@ -64,6 +69,29 @@ class MediaPlayerTimeUtil {
} }
fun uploadPlayRecord(meditationId:Int?,mediaId:Long?,
isQuit:Int,playTime:Int,isComplete:Int){
if (meditationId != null && mediaId != null) {
MuseHttp.getInstance().postMeditationPlayRecord(
meditationId = meditationId!!.toInt(),
isQuit = isQuit, mediaId = mediaId!!,
playTime = playTime,
isComplete = isComplete
)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
}, {
object : ThrowableConsumer() {
override fun accept(msg: String) {
}
}
})
}
}
} }
} }
\ No newline at end of file
...@@ -493,7 +493,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View. ...@@ -493,7 +493,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
jtv_test?.postDelayed({ YdlBuryPointUtil.sendClick("ClickEvent") }, 500) jtv_test?.postDelayed({ YdlBuryPointUtil.sendClick("ClickEvent") }, 500)
} else if (id == R.id.ll_meditation) { //冥想 } else if (id == R.id.ll_meditation) { //冥想
count(UserMyPageEvent.YDL_USER_MY_MIDDLE_TYPE_CLICK, "冥想") count(UserMyPageEvent.YDL_USER_MY_MIDDLE_TYPE_CLICK, "冥想")
val h5Params3 = H5Params(MH5_URL + "meditation?hideNavBar=1", null) val h5Params3 = H5Params(MH5_URL + "meditation/list?hideNavBar=1", null)
NewH5Activity.start(activity, h5Params3) NewH5Activity.start(activity, h5Params3)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment