Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-07-18 20:09:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
34c5171ceb2edb385baedb0827494857ca66db4e
34c5171c
1 parent
13803850
ref |> 播控中心处理contentId为空情况
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
View file @
34c5171
...
...
@@ -69,14 +69,14 @@ export class BackgroundAudioController {
//设置播放元数据
async setSessionMetaData(assetId: string, title: string, mediaImage: Resource, artist: string) {
this.lastItemAssetId = assetId
this.lastItemTitle = title
this.lastItemAssetId = assetId.length > 0 ? assetId : ""
this.lastItemTitle = title || ""
this.lastItemMediaImage = mediaImage
this.lastItemArtist = artist
this.lastItemArtist = artist
|| ""
}
async setSessionMetaDataWithDuration(assetId: string, title: string, mediaImage: Resource, artist: string, duration: number) {
Logger.debug(TAG, `SetAVMetadata assetId: ${assetId}
}
, title: ${title}, mediaImage: ${mediaImage}, artist: ${artist}, duration: ${duration}`);
Logger.debug(TAG, `SetAVMetadata assetId: ${assetId}, title: ${title}, mediaImage: ${mediaImage}, artist: ${artist}, duration: ${duration}`);
if (!this.gotContextFunc) { return }
let pixelMapImage:image.PixelMap | null = null
...
...
@@ -168,7 +168,7 @@ export class BackgroundAudioController {
// Logger.debug(TAG, `set progress: ` + progressDuration + " duration: " + totalDuration);
this.lastProgress = newProgress
if (this.lastItemAssetId) {
if (this.lastItemAssetId
!= undefined
) {
this.lastItemTotalDuration = totalDuration
await this.setSessionMetaDataWithDuration(
this.lastItemAssetId ?? "",
...
...
Please
register
or
login
to post a comment