1/* 2 * Copyright (c) 2024 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 16const __MovingPhotoView__ = requireInternal("multimedia.movingphotoview"); 17var PixelMapFormat; 18(function (PixelMapFormat) { 19 PixelMapFormat[PixelMapFormat["UNKNOWN"] = 0] = "UNKNOWN"; 20 PixelMapFormat[PixelMapFormat["RGBA_8888"] = 1] = "RGBA_8888"; 21 PixelMapFormat[PixelMapFormat["NV21"] = 2] = "NV21"; 22 PixelMapFormat[PixelMapFormat["RGBA_1010102"] = 3] = "RGBA_1010102"; 23 PixelMapFormat[PixelMapFormat["YCBCR_P010"] = 4] = "YCBCR_P010"; 24 PixelMapFormat[PixelMapFormat["YCRCB_P010"] = 5] = "YCRCB_P010"; 25})(PixelMapFormat || (PixelMapFormat = {})); 26var DynamicRangeMode; 27(function (DynamicRangeMode) { 28 DynamicRangeMode[DynamicRangeMode["HIGH"] = 0] = "HIGH"; 29 DynamicRangeMode[DynamicRangeMode["CONSTRAINT"] = 1] = "CONSTRAINT"; 30 DynamicRangeMode[DynamicRangeMode["STANDARD"] = 2] = "STANDARD"; 31})(DynamicRangeMode || (DynamicRangeMode = {})); 32 33class MovingPhotoView extends JSViewAbstract { 34 static create(value) { 35 __MovingPhotoView__.create(value); 36 } 37 38 static muted(value) { 39 __MovingPhotoView__.muted(value); 40 } 41 42 static hdrBrightness(value) { 43 __MovingPhotoView__.hdrBrightness(value); 44 } 45 46 static setPlaybackStrategy(value) { 47 __MovingPhotoView__.setPlaybackStrategy(value); 48 } 49 50 static objectFit(value) { 51 __MovingPhotoView__.objectFit(value); 52 } 53 54 static onComplete(value) { 55 __MovingPhotoView__.onComplete(value); 56 } 57 58 static onStart(value) { 59 __MovingPhotoView__.onStart(value); 60 } 61 62 static onStop(value) { 63 __MovingPhotoView__.onStop(value); 64 } 65 66 static onPause(value) { 67 __MovingPhotoView__.onPause(value); 68 } 69 70 static onFinish(value) { 71 __MovingPhotoView__.onFinish(value); 72 } 73 74 static onError(value) { 75 __MovingPhotoView__.onError(value); 76 } 77 78 static onPrepared(value) { 79 __MovingPhotoView__.onPrepared(value); 80 } 81 82 static onClick(value) { 83 __Common__.onClick(value); 84 } 85 86 static onAppear(value) { 87 __Common__.onAppear(value); 88 } 89 90 static onDisAppear(value) { 91 __Common__.onDisAppear(value); 92 } 93 94 static onTouch(value) { 95 __Common__.onTouch(value); 96 } 97 98 static onHover(value) { 99 __Common__.onHover(value); 100 } 101 102 static onKeyEvent(value) { 103 __Common__.onKeyEvent(value); 104 } 105 106 static onDeleteEvent(value) { 107 __Common__.onDeleteEvent(value); 108 } 109 110 static remoteMessage(value) { 111 __Common__.remoteMessage(value); 112 } 113 114 static autoPlayPeriod(startTime, endTime) { 115 __MovingPhotoView__.autoPlayPeriod(startTime, endTime); 116 } 117 118 static autoPlay(value) { 119 __MovingPhotoView__.autoPlay(value); 120 } 121 122 static repeatPlay(value) { 123 __MovingPhotoView__.repeatPlay(value); 124 } 125 126 static enableAnalyzer(value) { 127 __MovingPhotoView__.enableAnalyzer(value); 128 } 129} 130 131export default { 132 MovingPhotoView, 133 MovingPhotoViewController: __MovingPhotoView__.MovingPhotoViewController, 134 PixelMapFormat, 135 DynamicRangeMode, 136}; 137