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
zhenghy
2024-03-27 19:24:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
de73f8447df701c4b75a617f2aa9badc97a0408b
de73f844
1 parent
1f304c8e
播放器修改
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
47 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleComment.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
de73f84
...
...
@@ -40,7 +40,7 @@ export struct DetailPlayShortVideoPage {
@Provide progressVal: number = 0;
@Provide videoLandScape?: number = 1; // 视频朝向, 横屏视频:1;竖屏视频:2
playVMChanged(
name: string
) {
playVMChanged() {
this.url = this.playVM.url
this.newsSourceName = this.playVM.newsSourceName
this.newsTitle = this.playVM.newsTitle
...
...
@@ -98,7 +98,7 @@ export struct DetailPlayShortVideoPage {
WDPlayerRenderView({
playerController: this.playerController,
onLoad: async () => {
console.log('onload==')
console.log('onload=='
, this.contentId, this.relId, this.relType
)
// this.playVM.playWithContentId(this.contentId ?? "846899373")
this.playVM.playWithIds(this.contentId ?? "846899373",
this.relId ?? "500000301942", this.relType ?? "1")
...
...
@@ -155,7 +155,7 @@ export struct DetailPlayShortVideoPage {
this.playerController.continue = undefined;
}
urlChanged(
name: string
) {
urlChanged() {
if (this.url) {
console.log("url:" + this.url);
this.status = PlayerConstants.STATUS_START;
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleComment.ets
View file @
de73f84
...
...
@@ -90,57 +90,66 @@ export struct PlayerTitleComment {
.width('100%')
.alignItems(VerticalAlign.Bottom)
Slider({
value: this.progressVal,
step: 1,
style: SliderStyle.OutSet
})
.blockColor(Color.White)
.trackColor($r('app.color.track_color'))
.selectedColor($r('app.color.index_tab_selected_font_color'))
.trackThickness(1)
.width('100%')
.onChange((value: number, mode: SliderChangeMode) => {
this.playerController?.setSeekTime(value, mode);
})
Row() {
Image($r('app.media.ic_back'))
.width(44)
.aspectRatio(1)
.padding(13)
.onClick(() => {
if (this.isFullScreen) {
if (deviceInfo.deviceType != "phone") {
WindowModel.shared.getWindowSize().then((size) => {
if (size.width > size.height) {
router.back();
Column() {
Slider({
value: this.progressVal,
step: 1,
style: SliderStyle.OutSet
})
.blockColor(Color.White)
.trackColor($r('app.color.track_color'))
.selectedColor($r('app.color.index_tab_selected_font_color'))
.trackThickness(1)
.width('100%')
.onChange((value: number, mode: SliderChangeMode) => {
this.playerController?.setSeekTime(value, mode);
})
Row() {
Image($r('app.media.ic_back'))
.width(24)
.height(24)
.aspectRatio(1)
.onClick(() => {
if (this.isFullScreen) {
if (deviceInfo.deviceType != "phone") {
WindowModel.shared.getWindowSize().then((size) => {
if (size.width > size.height) {
router.back();
} else {
this.isFullScreen = !this.isFullScreen;
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
devicePLSensorManager.devicePLSensorOn(window.Orientation.PORTRAIT);
}
})
} else {
this.isFullScreen = !this.isFullScreen;
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
devicePLSensorManager.devicePLSensorOn(window.Orientation.PORTRAIT);
}
})
} else {
this.isFullScreen = !this.isFullScreen;
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
devicePLSensorManager.devicePLSensorOn(window.Orientation.PORTRAIT);
}
} else {
router.back();
}
})
} else {
router.back();
}
})
TextInput({ placeholder: '说两句...', text: this.comment })
.placeholderColor(Color.White)
.placeholderFont({ size: 14 })
.fontColor(Color.White)
.fontSize(14)
.maxLines(1)
.layoutWeight(1)
.backgroundColor('#1a1a1a')
.borderRadius(2)
.margin({ left: 12 })
}
.alignItems(VerticalAlign.Center)
.padding({ left: 16, right: 16, top: 11, bottom: 11 })
}
}.backgroundColor(Color.Black)
TextInput({ placeholder: '说两句...', text: this.comment })
.placeholderColor(Color.White)
.placeholderFont({ size: 14 })
.fontColor(Color.White)
.fontSize(14)
.maxLines(1)
.layoutWeight(1)
.backgroundColor('#ccc')
.borderRadius(2)
}.alignItems(VerticalAlign.Center)
}
.width('100%')
// .height('40%')
...
...
Please
register
or
login
to post a comment