1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import router from '@ohos.router' 17 18@Entry 19@Component 20struct VideoListModule { 21 build() { 22 Column({ space: 20 }) { 23 Row() { 24 Button({ type: ButtonType.Normal }) { 25 Text("<") 26 .fontColor(Color.White) 27 .fontSize(28) 28 } 29 .backgroundColor('#00191a32') 30 .padding({ left: 5 }) 31 .layoutWeight(1) 32 .onClick(() => { 33 router.pushUrl({ 34 url: 'pages/Index' 35 }) 36 }) 37 38 Text($r("app.string.back")) 39 .fontColor(Color.White) 40 .fontSize(24) 41 .layoutWeight(7) 42 .padding({ right: 10 }) 43 } 44 .padding({ top: 5 }) 45 46 Column({ space: 20 }) { 47 List({ space: 10 }) { 48 ListItem() { 49 Row() { 50 Image($r("app.media.HapticVideoPreview")) 51 .width("50%") 52 .height(100) 53 .borderRadius(10) 54 Column() { 55 Text($r("app.string.video_list_haptic_video")) 56 .fontSize(18) 57 .fontColor(Color.White) 58 Text($r("app.string.video_list_haptic_video_msg")) 59 .fontSize(16) 60 .fontColor("#ff837979") 61 } 62 .alignItems(HorizontalAlign.Start) 63 .padding({ left: 5 }) 64 .height(100) 65 } 66 .width("95%") 67 .padding({ left: 10 }) 68 .backgroundColor("#00002222") 69 .onClick(() => { 70 router.pushUrl({ 71 url: "module/VideoPlayModule", 72 params: { 73 vibrateFileName: "HapticVideo.json", 74 videoName: 'HapticVideo', 75 videoSrc: $r("app.media.HapticVideo"), 76 previewUri: $r("app.media.HapticVideoPreview"), 77 pages: "VideoListPage" 78 } 79 }) 80 }) 81 } 82 } 83 .listDirection(Axis.Vertical) 84 .divider({ strokeWidth: 10, color: "#00f3f3f3", startMargin: 20, endMargin: 20 }) 85 .height("60%") 86 } 87 } 88 .width('100%') 89 .height('100%') 90 .backgroundColor('#f2191a32') 91 } 92} 93