* @return The return of native surface pointer of video player
*/
virtual Any GetVideoPlayerSurface() = 0;
+
+ /**
+ * @brief Sets auto rotation feature. If enabled, video will rotate automatically according to the video orientation.
+ * @param[in] enable Whether to enable auto rotation feature. Default value is false.
+ */
+ virtual void SetAutoRotationEnabled(bool enable) = 0;
+
+ /**
+ * @brief Checks whether auto rotation feature is enabled.
+ * @return True if auto rotation feature is enabled, otherwise false. Default value is false.
+ */
+ virtual bool IsAutoRotationEnabled() const = 0;
+
+ /**
+ * @brief Sets letter box feature. If enabled, the video will play in the video player's aspect ratio.
+ * @param[in] enable Whether to enable letter box feature. Default value is false.
+ */
+ virtual void SetLetterBoxEnabled(bool enable) = 0;
+
+ /**
+ * @brief Checks whether letter box feature is enabled.
+ * @return True if letter box feature is enabled, otherwise false. Default value is false.
+ */
+ virtual bool IsLetterBoxEnabled() const = 0;
};
} // namespace Dali
GetImplementation(*this).LowerToBottom();
}
+void VideoPlayer::SetAutoRotationEnabled(bool enable)
+{
+ GetImplementation(*this).SetAutoRotationEnabled(enable);
+}
+
+bool VideoPlayer::IsAutoRotationEnabled() const
+{
+ return GetImplementation(*this).IsAutoRotationEnabled();
+}
+
+void VideoPlayer::SetLetterBoxEnabled(bool enable)
+{
+ GetImplementation(*this).SetLetterBoxEnabled(enable);
+}
+
+bool VideoPlayer::IsLetterBoxEnabled() const
+{
+ return GetImplementation(*this).IsLetterBoxEnabled();
+}
+
} // namespace Dali
*/
void LowerToBottom();
+ /**
+ * @brief Sets auto rotation feature. If enabled, video will rotate automatically according to the video orientation.
+ */
+ void SetAutoRotationEnabled(bool enable);
+
+ /**
+ * @brief Checks whether auto rotation feature is enabled.
+ */
+ bool IsAutoRotationEnabled() const;
+
+ /**
+ * @brief Sets letter box feature. If enabled, the video will play in the video player's aspect ratio.
+ */
+ void SetLetterBoxEnabled(bool enable);
+
+ /**
+ * @brief Checks whether letter box feature is enabled.
+ */
+ bool IsLetterBoxEnabled() const;
+
private: // Not intended for application developers
/**
* @brief Internal constructor
mPlugin->LowerToBottom();
}
}
+
+void VideoPlayer::SetAutoRotationEnabled(bool enable)
+{
+ if(mPlugin != nullptr)
+ {
+ mPlugin->SetAutoRotationEnabled(enable);
+ }
+}
+
+bool VideoPlayer::IsAutoRotationEnabled() const
+{
+ if(mPlugin != nullptr)
+ {
+ return mPlugin->IsAutoRotationEnabled();
+ }
+ return false;
+}
+
+void VideoPlayer::SetLetterBoxEnabled(bool enable)
+{
+ if(mPlugin != nullptr)
+ {
+ mPlugin->SetLetterBoxEnabled(enable);
+ }
+}
+
+bool VideoPlayer::IsLetterBoxEnabled() const
+{
+ if(mPlugin != nullptr)
+ {
+ return mPlugin->IsLetterBoxEnabled();
+ }
+ return false;
+}
+
+
VideoPlayerPlugin* VideoPlayer::GetVideoPlayerPlugin()
{
return mPlugin;
*/
void LowerToBottom();
+ /**
+ * @copydoc Dali::VideoPlayer::SetAutoRotationEnabled()
+ */
+ void SetAutoRotationEnabled(bool enable);
+
+ /**
+ * @copydoc Dali::VideoPlayer::IsAutoRotationEnabled() const
+ */
+ bool IsAutoRotationEnabled() const;
+
+ /**
+ * @copydoc Dali::VideoPlayer::SetLetterBoxEnabled()
+ */
+ void SetLetterBoxEnabled(bool enable);
+
+ /**
+ * @copydoc Dali::VideoPlayer::IsLetterBoxEnabled() const
+ */
+ bool IsLetterBoxEnabled() const;
+
/**
* @brief Gets Video Player plugin
* @SINCE_2_0.14