zhenghy

播放器修改

... ... @@ -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;
... ...
... ... @@ -90,6 +90,8 @@ export struct PlayerTitleComment {
.width('100%')
.alignItems(VerticalAlign.Bottom)
Row() {
Column() {
Slider({
value: this.progressVal,
step: 1,
... ... @@ -106,9 +108,9 @@ export struct PlayerTitleComment {
Row() {
Image($r('app.media.ic_back'))
.width(44)
.width(24)
.height(24)
.aspectRatio(1)
.padding(13)
.onClick(() => {
if (this.isFullScreen) {
if (deviceInfo.deviceType != "phone") {
... ... @@ -132,15 +134,22 @@ export struct PlayerTitleComment {
})
TextInput({ placeholder: '说两句...', text: this.comment })
.placeholderColor(Color.White)
.placeholderFont({ size: 14 })
.fontColor(Color.White)
.fontSize(14)
.maxLines(1)
.layoutWeight(1)
.backgroundColor('#ccc')
.backgroundColor('#1a1a1a')
.borderRadius(2)
}.alignItems(VerticalAlign.Center)
.margin({ left: 12 })
}
.alignItems(VerticalAlign.Center)
.padding({ left: 16, right: 16, top: 11, bottom: 11 })
}
}.backgroundColor(Color.Black)
}
.width('100%')
// .height('40%')
... ...