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
9e24eb32
Commit
9e24eb32
authored
Aug 07, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log去除
parent
2b429e33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
8 deletions
+1
-8
AudioPlayer.kt
ydl-media/src/main/java/com/ydl/media/audio/AudioPlayer.kt
+0
-3
PlayerFloatView.kt
ydl-media/src/main/java/com/ydl/media/view/PlayerFloatView.kt
+1
-5
No files found.
ydl-media/src/main/java/com/ydl/media/audio/AudioPlayer.kt
View file @
9e24eb32
...
...
@@ -5,7 +5,6 @@ import android.content.IntentFilter
import
android.media.AudioManager
import
android.os.Handler
import
android.os.Looper
import
android.util.Log
import
com.tencent.bugly.Bugly.applicationContext
import
com.ydl.media.audio.enums.PlayModeEnum
import
com.ydl.media.audio.manager.AudioFocusManager
...
...
@@ -174,7 +173,6 @@ class AudioPlayer private constructor() {
PlayModeEnum
.
LIST
->
{
if
(
playPosition
>=
musicList
.
lastIndex
)
pausePlayer
()
else
{
Log
.
d
(
"wjy"
,
"====OnCompletion==== $playPosition"
)
next
()
}
}
...
...
@@ -421,7 +419,6 @@ class AudioPlayer private constructor() {
ToastUtil
.
toastShort
(
"暂无内容"
)
return
}
Log
.
d
(
"wjy"
,
"next playPosition: $playPosition position: $position"
)
load
(
position
)
}
...
...
ydl-media/src/main/java/com/ydl/media/view/PlayerFloatView.kt
View file @
9e24eb32
...
...
@@ -6,7 +6,6 @@ import android.graphics.PixelFormat
import
android.graphics.Point
import
android.os.Build
import
android.text.TextUtils
import
android.util.Log
import
android.view.*
import
android.widget.FrameLayout
import
com.bumptech.glide.Glide
...
...
@@ -14,12 +13,11 @@ import com.ydl.media.R
import
com.ydl.media.audio.AudioPlayer
import
com.ydl.media.audio.OnPlayerEventListener
import
com.ydl.media.audio.model.Music
import
com.ydl.ydl_image.transform.GlideRoundTransform
import
com.ydl.ydlcommon.utils.statusBar.StatusBarUtil
import
com.yidianling.common.tools.RxImageTool
import
kotlinx.android.synthetic.main.item_playing_float_btn.view.*
import
java.util.concurrent.CopyOnWriteArraySet
import
kotlin.math.abs
import
com.ydl.ydl_image.transform.GlideRoundTransform
class
PlayerFloatView
(
ctx
:
Context
)
:
FrameLayout
(
ctx
.
applicationContext
)
{
...
...
@@ -90,12 +88,10 @@ class PlayerFloatView(ctx: Context) : FrameLayout(ctx.applicationContext) {
override
fun
onPreLoad
(
playPosition
:
Int
):
Boolean
{
AudioPlayer
.
get
().
getMusicList
().
elementAtOrNull
(
playPosition
)
?.
let
{
return
if
(
it
.
canPlay
)
{
Log
.
d
(
"wjy"
,
"onPreLoad true $playPosition"
)
tv_title
.
text
=
it
.
title
tv_name
.
text
=
it
.
artist
true
}
else
{
Log
.
d
(
"wjy"
,
"onPreLoad false $playPosition"
)
AudioPlayer
.
get
().
load
(
AudioPlayer
.
get
().
getNextPosition
(
playPosition
))
false
}
...
...
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