mirror of https://github.com/axmolengine/axmol.git
fix tizen related issues
This commit is contained in:
parent
50acf4c94b
commit
c4e6db4e9b
|
@ -298,7 +298,6 @@ void VideoPlayer::play()
|
|||
{
|
||||
player_set_display_mode(impl->_player, PLAYER_DISPLAY_MODE_FULL_SCREEN);
|
||||
}
|
||||
player_set_display_visible(impl->_player, true);
|
||||
|
||||
player_set_completed_cb(impl->_player, _player_completed_cb, this);
|
||||
player_set_interrupted_cb(impl->_player, _player_interrupted_cb, this);
|
||||
|
@ -309,6 +308,7 @@ void VideoPlayer::play()
|
|||
{
|
||||
this->onPlayEvent((int)VideoPlayer::EventType::PLAYING);
|
||||
}
|
||||
this->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -368,23 +368,32 @@ bool VideoPlayer::isPlaying() const
|
|||
void VideoPlayer::onEnter()
|
||||
{
|
||||
Widget::onEnter();
|
||||
this->setVisible(false);
|
||||
if (isVisible())
|
||||
{
|
||||
_VideoPlayerTizen* impl = (_VideoPlayerTizen*)_videoView;
|
||||
player_set_display_visible(impl->_player, true);
|
||||
}
|
||||
}
|
||||
|
||||
void VideoPlayer::onExit()
|
||||
{
|
||||
Widget::onExit();
|
||||
this->setVisible(true);
|
||||
_VideoPlayerTizen* impl = (_VideoPlayerTizen*)_videoView;
|
||||
player_set_display_visible(impl->_player, false);
|
||||
}
|
||||
|
||||
void VideoPlayer::setVisible(bool visible)
|
||||
{
|
||||
cocos2d::ui::Widget::setVisible(visible);
|
||||
_VideoPlayerTizen* impl = (_VideoPlayerTizen*)_videoView;
|
||||
|
||||
if (! _videoURL.empty())
|
||||
if (!visible)
|
||||
{
|
||||
_VideoPlayerTizen* impl = (_VideoPlayerTizen*)_videoView;
|
||||
player_set_display_visible(impl->_player, visible);
|
||||
player_set_display_visible(impl->_player, false);
|
||||
}
|
||||
else if(isRunning())
|
||||
{
|
||||
player_set_display_visible(impl->_player, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1262,6 +1262,11 @@ void NodeNameTest::onEnter()
|
|||
this->scheduleOnce(CC_CALLBACK_1(NodeNameTest::test, this), 0.05f, "test_key");
|
||||
}
|
||||
|
||||
void NodeNameTest::onExit()
|
||||
{
|
||||
TestCocosNodeDemo::onExit();
|
||||
}
|
||||
|
||||
void NodeNameTest::test(float dt)
|
||||
{
|
||||
auto parent = Node::create();
|
||||
|
|
|
@ -325,6 +325,7 @@ public:
|
|||
virtual std::string subtitle() const override;
|
||||
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
|
||||
void test(float dt);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue