Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
81b3ba15
Commit
81b3ba15
authored
May 27, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meditation type error when enter playDetail from floatView
parent
1669b637
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
14 deletions
+45
-14
HomeMuseView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeMuseView.kt
+1
-1
home_muse_view.xml
m-home/src/ydl/res/layout/home_muse_view.xml
+6
-8
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+0
-0
MeditationPlayModuleBean.kt
m-muse/src/main/java/com/yidianling/muse/bean/MeditationPlayModuleBean.kt
+1
-1
MeditationFloatEvent.kt
m-muse/src/main/java/com/yidianling/muse/event/MeditationFloatEvent.kt
+1
-0
MeditationWindowService.kt
m-muse/src/main/java/com/yidianling/muse/service/MeditationWindowService.kt
+6
-3
MediaPlayerTimeUtil.kt
m-muse/src/main/java/com/yidianling/muse/utils/MediaPlayerTimeUtil.kt
+29
-0
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+1
-1
No files found.
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeMuseView.kt
View file @
81b3ba15
...
...
@@ -116,9 +116,9 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv
it
?.
start
()
it
?.
setVolume
(
0.0F
,
0.0F
)
}
video_view
?.
setOnCompletionListener
{
video_view
?.
start
()
}
video_view
?.
setOnCompletionListener
{
video_view
?.
start
()
}
bean
.
mditationListResponse
?.
forEach
{
meditationTitles
.
add
(
it
.
comment
)
...
...
m-home/src/ydl/res/layout/home_muse_view.xml
View file @
81b3ba15
...
...
@@ -21,21 +21,19 @@
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#999999"
>
android:layout_height=
"match_parent"
>
<com.yidianling.home.widget.AdaptiveVideoView
android:id=
"@+id/video_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:focusable=
"false"
android:focusableInTouchMode=
"false"
/>
android:focusableInTouchMode=
"false"
/>
<!-- <ImageView-->
<!-- android:id="@+id/iv_video_background"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:scaleType="fitCenter"/>-->
<View
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#88999999"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
81b3ba15
This diff is collapsed.
Click to expand it.
m-muse/src/main/java/com/yidianling/muse/bean/MeditationPlayModuleBean.kt
View file @
81b3ba15
...
...
@@ -16,7 +16,7 @@ class MeditationPlayModuleBean : HomeItemBaseBean {
var
mediaList
:
ArrayList
<
MeditationDetail
>?
=
null
data class
MeditationDetail
(
val
medi
a
Type
:
Int
?
=
null
,
val
medi
tation
Type
:
Int
?
=
null
,
val
mediaId
:
Long
?=
null
,
val
meditationId
:
Long
,
val
title
:
String
,
...
...
m-muse/src/main/java/com/yidianling/muse/event/MeditationFloatEvent.kt
View file @
81b3ba15
...
...
@@ -8,3 +8,4 @@ class MeditationFloatEvent(
val
time
:
Long
?=
null
,
val
meditationDetail
:
MeditationPlayModuleBean
.
MeditationDetail
?=
null
)
m-muse/src/main/java/com/yidianling/muse/service/MeditationWindowService.kt
View file @
81b3ba15
...
...
@@ -143,7 +143,6 @@ class MeditationWindowService : LifecycleService() {
}
}
}
private
fun
updateFloatView
(
meditation
:
MeditationPlayModuleBean
.
MeditationDetail
)
{
...
...
@@ -155,8 +154,12 @@ class MeditationWindowService : LifecycleService() {
val
intent
=
Intent
(
this
,
PlayMeditationActivity
::
class
.
java
)
intent
.
putExtra
(
"MEDIA_ID"
,
meditation
.
mediaId
)
intent
.
putExtra
(
"MEDITATION_ID"
,
meditation
.
meditationId
)
intent
.
putExtra
(
"MEDITATION_TYPE"
,
meditation
.
medi
a
Type
)
intent
.
putExtra
(
"MEDITATION_TYPE"
,
meditation
.
medi
tation
Type
)
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
startActivity
(
intent
)
}
...
...
@@ -279,6 +282,7 @@ class MeditationWindowService : LifecycleService() {
if
(
EventBus
.
getDefault
().
isRegistered
(
this
))
{
EventBus
.
getDefault
().
unregister
(
this
)
}
mDisposable
?.
dispose
()
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
ECLAIR
)
{
stopForeground
(
true
)
}
...
...
@@ -328,7 +332,6 @@ class MeditationWindowService : LifecycleService() {
}
private
fun
postPlayRecord
(
isQuit
:
Int
,
playTime
:
Int
,
...
...
m-muse/src/main/java/com/yidianling/muse/utils/MediaPlayerTimeUtil.kt
View file @
81b3ba15
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
{
companion
object
{
...
...
@@ -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
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
81b3ba15
...
...
@@ -493,7 +493,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
jtv_test
?.
postDelayed
({
YdlBuryPointUtil
.
sendClick
(
"ClickEvent"
)
},
500
)
}
else
if
(
id
==
R
.
id
.
ll_meditation
)
{
//冥想
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
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment