|
|
@@ -19,7 +19,7 @@ import { BusinessError } from '@kit.BasicServicesKit';
|
|
|
import { avSession } from '@kit.AVSessionKit';
|
|
|
import { BackgroundTaskManager } from '../common/util/BackgroundTaskManager';
|
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
|
-import { ImageUtil, PreferencesUtil } from '@pura/harmony-utils';
|
|
|
+import { ImageUtil, PreferencesUtil, StrUtil } from '@pura/harmony-utils';
|
|
|
import { image } from '@kit.ImageKit';
|
|
|
import { SettingPage } from '../pages/SettingPage';
|
|
|
import { Utility } from '../common/util/Utility';
|
|
|
@@ -137,8 +137,12 @@ export class AvSessionController {
|
|
|
let pixelMapPath:string|undefined = curSource.pixelMapPath
|
|
|
|
|
|
let imagePixMap: PixelMap|string ;
|
|
|
- if(pixelMapPath){
|
|
|
- imagePixMap = await ImageUtil.imagePathToPixelMap(pixelMapPath)
|
|
|
+ if(pixelMapPath&&StrUtil.isNotEmpty(pixelMapPath)){
|
|
|
+ if(pixelMapPath.startsWith('http')){
|
|
|
+ imagePixMap =pixelMapPath
|
|
|
+ }else{
|
|
|
+ imagePixMap = await ImageUtil.imagePathToPixelMap(pixelMapPath)
|
|
|
+ }
|
|
|
}else{
|
|
|
imagePixMap = await ImageUtil.getPixelMapFromMedia($r('app.media.ic_avatar2'));
|
|
|
}
|