/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// EXTERNAL INCLUDES
#include <dali/devel-api/actors/actor-devel.h>
#include <dali/devel-api/adaptor-framework/window-devel.h>
+#include <dali/devel-api/rendering/texture-devel.h>
#include <dali/devel-api/scripting/scripting.h>
#include <dali/integration-api/debug.h>
#include <dali/public-api/adaptor-framework/native-image-source.h>
#include <dali/public-api/animation/constraint.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/devel-api/rendering/texture-devel.h>
#include <cstring>
// INTERNAL INCLUDES
Actor self = Self();
mVideoPlayer.FinishedSignal().Connect(this, &VideoView::EmitSignalFinish);
- DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::AccessibleImpl(actor, Dali::Accessibility::Role::VIDEO));
- });
+ // Accessibility
+ self.SetProperty(DevelControl::Property::ACCESSIBILITY_ROLE, Dali::Accessibility::Role::VIDEO);
+ self.SetProperty(DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, true);
//update self property
self.RegisterProperty(IS_VIDEO_VIEW_PROPERTY_NAME, true, Property::READ_WRITE);
}
}
-float VideoView::GetHeightForWidth(float width)
-{
- if(mVideoSize.GetWidth() > 0 && mVideoSize.GetHeight() > 0)
- {
- return GetHeightForWidthBase(width);
- }
- else
- {
- return Control::GetHeightForWidthBase(width);
- }
-}
-
-float VideoView::GetWidthForHeight(float height)
-{
- if(mVideoSize.GetWidth() > 0 && mVideoSize.GetHeight() > 0)
- {
- return GetWidthForHeightBase(height);
- }
- else
- {
- return Control::GetWidthForHeightBase(height);
- }
-}
-
void VideoView::SetWindowSurfaceTarget()
{
Actor self = Self();
{
// For underlay rendering mode, video display area have to be transparent.
Geometry geometry = VisualFactoryCache::CreateQuadGeometry();
- Shader shader = Shader::New(SHADER_VIDEO_VIEW_VERT, SHADER_VIDEO_VIEW_FRAG);
+ Shader shader = Shader::New(SHADER_VIDEO_VIEW_VERT, SHADER_VIDEO_VIEW_FRAG, Shader::Hint::NONE, "VIDEO_VIEW_OVERLAY");
mOverlayRenderer = Renderer::New(geometry, shader);
mOverlayRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::OFF);
}
DevelTexture::ApplyNativeFragmentShader(mNativeTexture, fragmentShader);
}
- return Dali::Shader::New(vertexShader, fragmentShader);
+ return Dali::Shader::New(vertexShader, fragmentShader, Shader::Hint::NONE, "VIDEO_VIEW");
}
bool VideoView::GetStringFromProperty(const Dali::Property::Value& value, std::string& output)