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
yuzhilin
2024-04-30 15:01:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6057a77d54a483aea589f9ce3e9d7543ae080226
6057a77d
1 parent
05807bab
fix:解决频道订阅列表无法滑动问题、h5详情页播放器样式
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
23 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_full_screen.png
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_pause.png
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_play.png
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_replay.png
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/slider_block.png
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
6057a77
...
...
@@ -4,6 +4,7 @@ import { Logger } from 'wdKit/Index';
import { performJSCallNative } from './JsBridgeBiz';
import { H5CallNativeType } from './H5CallNativeType';
import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
import { DateTimeUtils } from 'wdKit'
const TAG = 'WdWebLocalComponent';
...
...
@@ -22,6 +23,13 @@ export struct WdWebLocalComponent {
@State positionLeft: number = 0
@State positionTop: number = 0
@State videoLandscape: string = '1'
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
@State sliderStartTime: string = '';
@State currentTime: number = 0;
@State durationTime: number = 0;
@State durationStringTime: string = '';
@State isPause: boolean = true;
controller: VideoController = new VideoController()
build() {
Column() {
...
...
@@ -77,22 +85,87 @@ export struct WdWebLocalComponent {
})
if (this.videoUrl) {
Video({ src: this.videoUrl })
.autoPlay(true)
.objectFit(ImageFit.Contain)
.width(this.positionWidth)
.height(this.positionHeight)
.borderRadius(5)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
Stack({ alignContent: Alignment.Bottom }) {
Video({
src: this.videoUrl,
currentProgressRate: this.curRate,
controller: this.controller
})
.offset({
x: this.positionLeft,
y: this.positionTop
})
.id("video")
}
.borderRadius(5)
.controls(false)
.autoPlay(true)
.objectFit(ImageFit.Contain)
.onStart(() => {
this.isPause = false
})
.onPause(() => {
this.isPause = true
})
.onPrepared((event) => {
if (event) {
this.durationTime = event.duration
}
})
.onUpdate((event) => {
if (event) {
this.currentTime = event.time
}
})
Row() {
Image($r(this.isPause ? 'app.media.icon_play' : 'app.media.icon_pause'))
.width(24)
.height(24)
.onClick(()=>{
if(this.isPause){
this.controller.start()
}else{
this.controller.pause()
}
})
Row() {
Text(DateTimeUtils.getFormattedDuration(this.currentTime * 1000)).fontSize(12).fontColor(Color.White).fontWeight(600)
Slider({
value: this.currentTime,
min: 0,
max: this.durationTime
})
.width("50%")
.selectedColor('#ED2800')
.margin({ left: 4, right: 4 })
// .blockStyle({
// type: SliderBlockType.IMAGE,
// image: $r('app.media.slider_block')
// })
// .blockSize({ width: 18, height: 12 })
.onChange((value: number, mode: SliderChangeMode) => {
this.controller.setCurrentTime(value);
})
Text(DateTimeUtils.getFormattedDuration(this.durationTime * 1000)).fontSize(12).fontColor(Color.White).fontWeight(600)
}
.justifyContent(FlexAlign.Center)
Image($r('app.media.icon_full_screen'))
.width(24)
.height(24)
.onClick(()=>{
this.controller.requestFullscreen(true)
})
}
.opacity(0.8)
.width("100%")
.justifyContent(FlexAlign.SpaceAround)
}
.width(this.positionWidth)
.height(this.positionHeight)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
})
.offset({
x: this.positionLeft,
y: this.positionTop
})
.id("video")
}
}
}.width('100%')
.height(this.webHeight)
...
...
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_full_screen.png
0 → 100644
View file @
6057a77
289 Bytes
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_pause.png
0 → 100644
View file @
6057a77
339 Bytes
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_play.png
0 → 100644
View file @
6057a77
293 Bytes
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/icon_replay.png
0 → 100644
View file @
6057a77
1.79 KB
sight_harmony/commons/wdWebComponent/src/main/resources/base/media/slider_block.png
0 → 100644
View file @
6057a77
497 Bytes
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
6057a77
...
...
@@ -169,15 +169,12 @@ export struct ImageAndTextPageComponent {
detailedSkeleton()
}
}
//底部交互区
if (this.contentDetailData?.length) {
OperRowListView({
contentDetailData: this.contentDetailData[0],
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
})
}
OperRowListView({
contentDetailData: this.contentDetailData[0],
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
6057a77
...
...
@@ -319,7 +319,7 @@ struct ChannelDialog {
}
}
}),
PanGesture({ fingers: 1, direction:
null
, distance: 0 })
PanGesture({ fingers: 1, direction:
this.isEditIng ? PanDirection.All:PanDirection.None
, distance: 0 })
.onActionStart((event: GestureEvent) => {
this.dragItem = item.num
this.dragRefOffsetX = 0
...
...
Please
register
or
login
to post a comment