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 16 #ifndef FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_ENGINE_JSI_NATIVEMODULE_ARKTS_NATIVE_VIDEO_BRIDGE_H 17 #define FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_ENGINE_JSI_NATIVEMODULE_ARKTS_NATIVE_VIDEO_BRIDGE_H 18 19 #include "bridge/declarative_frontend/engine/jsi/nativeModule/arkts_native_api_bridge.h" 20 21 namespace OHOS::Ace::NG { 22 class VideoBridge { 23 public: 24 static ArkUINativeModuleValue SetAutoPlay(ArkUIRuntimeCallInfo* runtimeCallInfo); 25 static ArkUINativeModuleValue ResetAutoPlay(ArkUIRuntimeCallInfo* runtimeCallInfo); 26 static ArkUINativeModuleValue SetControls(ArkUIRuntimeCallInfo* runtimeCallInfo); 27 static ArkUINativeModuleValue ResetControls(ArkUIRuntimeCallInfo* runtimeCallInfo); 28 static ArkUINativeModuleValue SetObjectFit(ArkUIRuntimeCallInfo* runtimeCallInfo); 29 static ArkUINativeModuleValue ResetObjectFit(ArkUIRuntimeCallInfo* runtimeCallInfo); 30 static ArkUINativeModuleValue SetLoop(ArkUIRuntimeCallInfo* runtimeCallInfo); 31 static ArkUINativeModuleValue ResetLoop(ArkUIRuntimeCallInfo* runtimeCallInfo); 32 static ArkUINativeModuleValue SetMuted(ArkUIRuntimeCallInfo* runtimeCallInfo); 33 static ArkUINativeModuleValue ResetMuted(ArkUIRuntimeCallInfo* runtimeCallInfo); 34 static ArkUINativeModuleValue SetOpacity(ArkUIRuntimeCallInfo* runtimeCallInfo); 35 static ArkUINativeModuleValue ResetOpacity(ArkUIRuntimeCallInfo* runtimeCallInfo); 36 static ArkUINativeModuleValue SetTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 37 static ArkUINativeModuleValue ResetTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 38 static ArkUINativeModuleValue SetVideoSurfaceBackgroundColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 39 static ArkUINativeModuleValue ResetVideoSurfaceBackgroundColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 40 static ArkUINativeModuleValue SetShortcutKeyEnabled(ArkUIRuntimeCallInfo* runtimeCallInfo); 41 static ArkUINativeModuleValue ResetShortcutKeyEnabled(ArkUIRuntimeCallInfo* runtimeCallInfo); 42 static ArkUINativeModuleValue SetOnStart(ArkUIRuntimeCallInfo* runtimeCallInfo); 43 static ArkUINativeModuleValue ResetOnStart(ArkUIRuntimeCallInfo* runtimeCallInfo); 44 static ArkUINativeModuleValue SetOnPause(ArkUIRuntimeCallInfo* runtimeCallInfo); 45 static ArkUINativeModuleValue ResetOnPause(ArkUIRuntimeCallInfo* runtimeCallInfo); 46 static ArkUINativeModuleValue SetOnFinish(ArkUIRuntimeCallInfo* runtimeCallInfo); 47 static ArkUINativeModuleValue ResetOnFinish(ArkUIRuntimeCallInfo* runtimeCallInfo); 48 static ArkUINativeModuleValue SetOnFullscreenChange(ArkUIRuntimeCallInfo* runtimeCallInfo); 49 static ArkUINativeModuleValue ResetOnFullscreenChange(ArkUIRuntimeCallInfo* runtimeCallInfo); 50 static ArkUINativeModuleValue SetOnPrepared(ArkUIRuntimeCallInfo* runtimeCallInfo); 51 static ArkUINativeModuleValue ResetOnPrepared(ArkUIRuntimeCallInfo* runtimeCallInfo); 52 static ArkUINativeModuleValue SetOnSeeking(ArkUIRuntimeCallInfo* runtimeCallInfo); 53 static ArkUINativeModuleValue ResetOnSeeking(ArkUIRuntimeCallInfo* runtimeCallInfo); 54 static ArkUINativeModuleValue SetOnSeeked(ArkUIRuntimeCallInfo* runtimeCallInfo); 55 static ArkUINativeModuleValue ResetOnSeeked(ArkUIRuntimeCallInfo* runtimeCallInfo); 56 static ArkUINativeModuleValue SetOnUpdate(ArkUIRuntimeCallInfo* runtimeCallInfo); 57 static ArkUINativeModuleValue ResetOnUpdate(ArkUIRuntimeCallInfo* runtimeCallInfo); 58 static ArkUINativeModuleValue SetOnError(ArkUIRuntimeCallInfo* runtimeCallInfo); 59 static ArkUINativeModuleValue ResetOnError(ArkUIRuntimeCallInfo* runtimeCallInfo); 60 static ArkUINativeModuleValue SetOnStop(ArkUIRuntimeCallInfo* runtimeCallInfo); 61 static ArkUINativeModuleValue ResetOnStop(ArkUIRuntimeCallInfo* runtimeCallInfo); 62 static ArkUINativeModuleValue SetEnableAnalyzer(ArkUIRuntimeCallInfo* runtimeCallInfo); 63 static ArkUINativeModuleValue ResetEnableAnalyzer(ArkUIRuntimeCallInfo* runtimeCallInfo); 64 static ArkUINativeModuleValue SetAnalyzerConfig(ArkUIRuntimeCallInfo* runtimeCallInfo); 65 static ArkUINativeModuleValue ResetAnalyzerConfig(ArkUIRuntimeCallInfo* runtimeCallInfo); 66 }; 67 } 68 69 #endif // FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_ENGINE_JSI_NATIVEMODULE_ARKTS_NATIVE_VIDEO_BRIDGE_H 70