王士厅

fix: 在热点频道下,进入横屏视频详情,点击分享按钮后,再取消分享,视频不能续播

... ... @@ -35,10 +35,12 @@ export struct PlayerFullScreenView {
share() {
this.playerController?.switchPlayOrPause()
WDShare.shareContent(this.contentDetailData)
// WDShare.shareContent(this.contentDetailData).then(() => {
// this.playerController?.switchPlayOrPause()
// })
WDShare.shareContent(this.contentDetailData).then((res) => {
// console.log(TAG, "分享弹框关闭", res);
if(res == 'dismiss') {
this.playerController?.switchPlayOrPause()
}
})
}
updateProgress() {
... ...
... ... @@ -9,22 +9,28 @@ import { AppInnerLinkGenerator } from 'wdRouter';
export class WDShare {
static shareContent(content: ContentDetailDTO, pageName: string ="", pageId: string = "") {
//TODO: 处理分享弹框交互和 海报逻辑
WDShareBase.getInstance().share({
to: ShareType.System,
scene: ShareScene.System,
type: ShareContentType.Link,
obj: {
title: content.shareInfo.shareTitle,
desc: content.shareInfo.shareSummary,
link: content.shareInfo.shareUrl,
deeplink:AppInnerLinkGenerator.generateDeepLinkWithConent(content),
posterImg:$r("app.media.test_share_poster"),
}
})
static shareContent(content: ContentDetailDTO, pageName: string = "", pageId: string = ""): Promise<string> {
return new Promise((resolve, reject) => {
// 处理分享弹框交互和海报逻辑
WDShareBase.getInstance().share({
to: ShareType.System,
scene: ShareScene.System,
type: ShareContentType.Link,
obj: {
title: content.shareInfo.shareTitle,
desc: content.shareInfo.shareSummary,
link: content.shareInfo.shareUrl,
deeplink: AppInnerLinkGenerator.generateDeepLinkWithConent(content),
posterImg: $r("app.media.test_share_poster"),
}
})?.then((res) => {
// console.log("分享成功", res);
resolve(res);
}).catch((() => {
// console.error("分享失败");
reject("error");
}))
});
}
static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") {
... ...