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 objectFit(value) { 43 __MovingPhotoView__.objectFit(value); 44 } 45 46 static onComplete(value) { 47 __MovingPhotoView__.onComplete(value); 48 } 49 50 static onStart(value) { 51 __MovingPhotoView__.onStart(value); 52 } 53 54 static onStop(value) { 55 __MovingPhotoView__.onStop(value); 56 } 57 58 static onPause(value) { 59 __MovingPhotoView__.onPause(value); 60 } 61 62 static onFinish(value) { 63 __MovingPhotoView__.onFinish(value); 64 } 65 66 static onError(value) { 67 __MovingPhotoView__.onError(value); 68 } 69 70 static onClick(value) { 71 __Common__.onClick(value); 72 } 73 74 static onAppear(value) { 75 __Common__.onAppear(value); 76 } 77 78 static onDisAppear(value) { 79 __Common__.onDisAppear(value); 80 } 81 82 static onTouch(value) { 83 __Common__.onTouch(value); 84 } 85 86 static onHover(value) { 87 __Common__.onHover(value); 88 } 89 90 static onKeyEvent(value) { 91 __Common__.onKeyEvent(value); 92 } 93 94 static onDeleteEvent(value) { 95 __Common__.onDeleteEvent(value); 96 } 97 98 static remoteMessage(value) { 99 __Common__.remoteMessage(value); 100 } 101 102 static autoPlayPeriod(startTime, endTime) { 103 __MovingPhotoView__.autoPlayPeriod(startTime, endTime); 104 } 105 106 static autoPlay(value) { 107 __MovingPhotoView__.autoPlay(value); 108 } 109 110 static repeatPlay(value) { 111 __MovingPhotoView__.repeatPlay(value); 112 } 113} 114 115export default { 116 MovingPhotoView, 117 MovingPhotoViewController: __MovingPhotoView__.MovingPhotoViewController, 118 PixelMapFormat, 119 DynamicRangeMode, 120}; 121