54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
|
|
*
|
|
* Description: TjdUiWFCustomVideoPage.h
|
|
*
|
|
* Author: huangshuyi
|
|
*
|
|
* Create: 2024-8
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef TJDUI_WF_CUSTOM_VIDEO_PAGE_H
|
|
#define TJDUI_WF_CUSTOM_VIDEO_PAGE_H
|
|
|
|
#include "video_play_wrapper.h"
|
|
#include <string>
|
|
|
|
using namespace Audio;
|
|
using namespace OHOS::Media;
|
|
using OHOS::Media::Player;
|
|
|
|
namespace TJD {
|
|
|
|
class TjdUiVideoCommon : public OHOS::MediaVideoPlay
|
|
{
|
|
public:
|
|
TjdUiVideoCommon(OHOS::Surface *surface, std::string uri, bool isPureVideo) : MediaVideoPlay(surface, nullptr, uri, isPureVideo) {}
|
|
};
|
|
|
|
class TjdUiWFCustomVideoPage : public OHOS::HeapBase
|
|
{
|
|
public:
|
|
TjdUiWFCustomVideoPage(OHOS::UIView *parent, std::string uri, std::string previewPath);
|
|
virtual ~TjdUiWFCustomVideoPage();
|
|
bool StartPlay();
|
|
bool ResumePlay();
|
|
bool PausePlay();
|
|
bool StopPlay();
|
|
bool IsPaused();
|
|
bool IsPlayed();
|
|
bool IsStopped();
|
|
OHOS::MediaVideoPlay* GetVideoPlay();
|
|
private:
|
|
bool InitView(void);
|
|
OHOS::UIView *Parent_{nullptr};
|
|
OHOS::UILiteSurfaceView *surfaceView_ = nullptr;
|
|
OHOS::ColorType colorKey_;
|
|
std::string uri_;
|
|
std::string previewPath_;
|
|
TjdUiVideoCommon *videoPlay_ = nullptr;
|
|
};
|
|
|
|
} // namespace OHOS
|
|
#endif // MAIN_CLOCK_VIEW_H
|