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 16 #include "ohos_adapter/bridge/ark_media_avsession_callback_adapter_impl.h" 17 18 namespace OHOS::ArkWeb { 19 ArkMediaAVSessionCallbackAdapterImpl(std::shared_ptr<OHOS::NWeb::MediaAVSessionCallbackAdapter> ref)20ArkMediaAVSessionCallbackAdapterImpl::ArkMediaAVSessionCallbackAdapterImpl( 21 std::shared_ptr<OHOS::NWeb::MediaAVSessionCallbackAdapter> ref) 22 : real_(ref) 23 {} 24 Play()25void ArkMediaAVSessionCallbackAdapterImpl::Play() 26 { 27 real_->Play(); 28 } 29 Pause()30void ArkMediaAVSessionCallbackAdapterImpl::Pause() 31 { 32 real_->Pause(); 33 } 34 Stop()35void ArkMediaAVSessionCallbackAdapterImpl::Stop() 36 { 37 real_->Stop(); 38 } 39 SeekTo(int64_t millisTime)40void ArkMediaAVSessionCallbackAdapterImpl::SeekTo(int64_t millisTime) 41 { 42 real_->SeekTo(millisTime); 43 } 44 } // namespace OHOS::ArkWeb 45