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_position_adapter_impl.h" 17 18 namespace OHOS::ArkWeb { 19 ArkMediaAVSessionPositionAdapterImpl(std::shared_ptr<OHOS::NWeb::MediaAVSessionPositionAdapter> ref)20ArkMediaAVSessionPositionAdapterImpl::ArkMediaAVSessionPositionAdapterImpl( 21 std::shared_ptr<OHOS::NWeb::MediaAVSessionPositionAdapter> ref) 22 : real_(ref) 23 {} 24 SetDuration(int64_t duration)25void ArkMediaAVSessionPositionAdapterImpl::SetDuration(int64_t duration) 26 { 27 real_->SetDuration(duration); 28 } 29 GetDuration()30int64_t ArkMediaAVSessionPositionAdapterImpl::GetDuration() 31 { 32 return real_->GetDuration(); 33 } 34 SetElapsedTime(int64_t elapsedTime)35void ArkMediaAVSessionPositionAdapterImpl::SetElapsedTime(int64_t elapsedTime) 36 { 37 real_->SetElapsedTime(elapsedTime); 38 } 39 GetElapsedTime()40int64_t ArkMediaAVSessionPositionAdapterImpl::GetElapsedTime() 41 { 42 return real_->GetElapsedTime(); 43 } 44 SetUpdateTime(int64_t updateTime)45void ArkMediaAVSessionPositionAdapterImpl::SetUpdateTime(int64_t updateTime) 46 { 47 real_->SetUpdateTime(updateTime); 48 } 49 GetUpdateTime()50int64_t ArkMediaAVSessionPositionAdapterImpl::GetUpdateTime() 51 { 52 return real_->GetUpdateTime(); 53 } 54 } // namespace OHOS::ArkWeb 55