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
liyubing
2024-05-27 14:18:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b9b0302bd776d3213eae763f6faf34fc77bea686
b9b0302b
1 parent
c81f0913
fix:【uat】进入视频直播页,点全屏,播放显示一半,看图
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
5 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerInfoComponent.ets
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderLiveView.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
b9b0302
...
...
@@ -9,6 +9,14 @@ import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment
const TAG = 'DetailPlayLiveCommon'
/**
* @Description: 沉浸式和非沉浸式直播页面
* @Author:
* @Email:
* @CreateDate:
* @UpdateRemark: 更新说明
* @Version: 1.0
*/
@Entry
@Component
export struct DetailPlayLiveCommon {
...
...
@@ -41,8 +49,10 @@ export struct DetailPlayLiveCommon {
Column() {
// 直播预约或横屏直播统一进横屏直播
if (this.liveState === 'wait' || this.liveStyle === 0) {
// 非沉浸式
DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType })
} else if (this.liveStyle === 1) {
// 沉浸式
DetailPlayVLivePage()
}
}
...
...
@@ -61,6 +71,7 @@ export struct DetailPlayLiveCommon {
console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
if (data) {
this.contentDetailData = data[0];
// if (this.contentDetailData.openComment === 1) {
console.log(TAG, '查询视频详情用于评论展示 openComment:', this.contentDetailData.openComment)
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
b9b0302
...
...
@@ -15,6 +15,9 @@ import { ResponseDTO } from 'wdNetwork/Index';
let TAG: string = 'DetailPlayLivePage';
/**
* 非沉浸式房间直播组件
*/
@Component
export struct DetailPlayLivePage {
//横竖屏,默认竖屏
...
...
@@ -63,7 +66,7 @@ export struct DetailPlayLivePage {
build() {
Column() {
TopPlayComponent({ playerController: this.playerController })
.height(
211
)
.height(
this.displayDirection == DisplayDirection.VERTICAL ?211:'100%'
)
TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab })
.layoutWeight(1)
.visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
b9b0302
...
...
@@ -12,6 +12,9 @@ import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
const storage = LocalStorage.getShared();
const TAG = 'DetailPlayVLivePage'
/**
* 沉浸式房间直播组件
*/
@Entry(storage)
@Component
export struct DetailPlayVLivePage {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabComponent.ets
View file @
b9b0302
...
...
@@ -2,6 +2,9 @@ import { TabChatComponent } from './TabChatComponent'
import { TabInfoComponent } from './TabInfoComponent'
import { TabLiveComponent } from './TabLiveComponent'
/**
* 非沉浸式直播 tab 组件
*/
@Component
export struct TabComponent {
@Prop @Watch('changeToChart') changeToTab: number
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
b9b0302
import { LiveDetailsBean } from 'wdBean/Index';
import { StringUtils } from 'wdKit/Index';
import { PlayerConstants, WDAliPlayerController, WDPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { Logger, StringUtils } from 'wdKit/Index';
import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { PlayUIComponent } from './PlayUIComponent';
import { Logger } from 'wdKit/Index';
import { PictureLoading } from '../../vertical/PictureLoading';
const TAG: string = 'TopPlayComponent'
...
...
@@ -23,6 +22,7 @@ export struct TopPlayComponent {
@State isLoading: boolean = false
// 获取播放资源能播放了
@State isCanPlay: boolean = false
private playUrl: string = ""
private xComponentIsLoaded: boolean = false
...
...
@@ -99,6 +99,7 @@ export struct TopPlayComponent {
build() {
Stack() {
// 视频资源播放
WDPlayerRenderLiveView({
playerController: this.playerController,
onLoad: async () => {
...
...
@@ -112,17 +113,20 @@ export struct TopPlayComponent {
.width('100%')
.visibility(this.isWait ? Visibility.None : Visibility.Visible)
// 直播房间图
Image(this.imgUrl)
.objectFit(ImageFit.Cover)
.visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
.contrast(this.isEnd ? 0.2 : 1)
.width('100%')
// loading
PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible)
// 视频播放器上的控制面板和信息
PlayUIComponent({ playerController: this.playerController, isShowBottom: this.isCanPlay })
// 直播结束
Text('直播已结束')
.fontSize('20fp')
.fontWeight(500)
...
...
@@ -131,6 +135,7 @@ export struct TopPlayComponent {
Visibility.None)
// 直播资源加载失败
Column() {
Text('直播加载中,请稍候重试')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerInfoComponent.ets
View file @
b9b0302
...
...
@@ -22,6 +22,7 @@ export struct PlayerInfoComponent {
}
.cachedCount(2)
.indicator(false)
.effectMode(EdgeEffect.None)
.loop(false)
.width('100%')
.height('100%')
...
...
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderLiveView.ets
View file @
b9b0302
import componentUtils from '@ohos.arkui.componentUtils';
import { WDPlayerController } from '../controller/WDPlayerController'
import { WindowModel } from 'wdKit';
import { Logger } from '../utils/Logger';
import { enableAliPlayer } from '../utils/GlobalSetting';
...
...
Please
register
or
login
to post a comment