axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
932 stars 205 forks source link

UIMediaPlayer action no working problem #2253

Open Sevael opened 18 hours ago

Sevael commented 18 hours ago

UIMediaPlayer function "void pause()" and "void resume()" are confuse with "void Node::pause()" and "void Node::resume()". It cause all action attatch to UIMediaPlayer is not working, because the the Node:resume() will never call.

Is is better change the name of "UIMediaPlayer::pause()" and "UIMediaPlayer::resume()" to something like: "UIMediaPlayer::pauseVideo()" and "UIMediaPlayer::resumeVideo()"

after change the name, it work fine.

Thank you.

Sevael commented 18 hours ago

the best way to fixed this problem is:

``

void MediaPlayer::pause() { Widget::pause(); pauseVideo(); }

void MediaPlayer::resume() { Widget::resume(); resumeVideo(); }

void MediaPlayer::pauseVideo() { //blablabla }

void MediaPlayer::resumeVideo() { //blablabla }

``