2014-05-09 11:30:07 +08:00
|
|
|
#ifndef __tests__VideoPlayerTest__
|
|
|
|
#define __tests__VideoPlayerTest__
|
2014-05-08 18:14:32 +08:00
|
|
|
|
|
|
|
#include "../UIScene.h"
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
|
2014-05-09 11:30:07 +08:00
|
|
|
class VideoPlayerTest : public UIScene
|
2014-05-08 18:14:32 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-05-09 11:30:07 +08:00
|
|
|
UI_SCENE_CREATE_FUNC(VideoPlayerTest);
|
2014-05-08 18:14:32 +08:00
|
|
|
|
|
|
|
virtual bool init();
|
|
|
|
|
|
|
|
void menuCloseCallback(Ref* sender);
|
|
|
|
|
|
|
|
void menuRatioCallback(Ref* sender);
|
|
|
|
void menuResourceVideoCallback(Ref* sender);
|
|
|
|
void menuOnlineVideoCallback(Ref* sender);
|
|
|
|
|
|
|
|
void menuFullScreenCallback(Ref* sender);
|
|
|
|
void menuPauseCallback(Ref* sender);
|
|
|
|
void menuResumeCallback(Ref* sender);
|
|
|
|
void menuStopCallback(Ref* sender);
|
|
|
|
void menuHintCallback(Ref* sender);
|
|
|
|
|
2014-05-12 11:17:06 +08:00
|
|
|
void sliderCallback(Ref *sender, ui::Slider::EventType eventType);
|
2014-05-08 18:14:32 +08:00
|
|
|
|
2014-05-12 11:35:57 +08:00
|
|
|
void videoEventCallback(Ref* sender, experimental::ui::VideoPlayer::EventType eventType);
|
2014-05-08 18:14:32 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void createVideo();
|
|
|
|
void createSlider();
|
|
|
|
|
|
|
|
MenuItemFont* _hintItem;
|
2014-05-09 11:30:07 +08:00
|
|
|
experimental::ui::VideoPlayer* _videoPlayer;
|
2014-05-08 18:14:32 +08:00
|
|
|
Label* _videoStateLabel;
|
|
|
|
Rect _visibleRect;
|
|
|
|
|
|
|
|
Layer* _rootLayer;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2014-05-09 11:30:07 +08:00
|
|
|
#endif // __tests__VideoPlayerTest__
|