Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve VideoPlayer fullscreen for 2d-tasks/issues/1562 #4845

Merged
merged 4 commits into from Jul 10, 2019

Conversation

knoxHuang
Copy link
Contributor

@knoxHuang knoxHuang commented Jul 9, 2019

Re: cocos/2d-tasks#1562

Changes:

  • 完善 screen 的全屏事件加入了失败的 error 事件
  • 完善 VideoPlayer 全屏,修复在 ie 中全屏无法居中的 bug

xunyi0 and others added 2 commits Jul 5, 2019
* fix ArmatureDisplay property error.

* modify the translation
@jareguo jareguo closed this Jul 9, 2019
@jareguo jareguo reopened this Jul 9, 2019
@knoxHuang
Copy link
Contributor Author

knoxHuang commented Jul 9, 2019

不进 2.1.2,放到 2.2

@jareguo jareguo changed the base branch from v2.1.2-release to v2.2.0 Jul 9, 2019
@@ -48,6 +48,7 @@ let VideoPlayerImpl = cc.Class({
this._video = null;
this._url = '';

this._preFullScreenEnabled = undefined;
Copy link
Member

@pandamicro pandamicro Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个类型应该是 boolean,为什么要赋值为 undefined

}
else if (cc.screen.fullScreen()) {
cc.screen.exitFullScreen(video);
if (self._preFullScreenEnabled !== undefined) {
Copy link
Member

@pandamicro pandamicro Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是为了延迟处理,按理说只需要记录一个 waitingFullscreen 就好了

Copy link
Contributor Author

@knoxHuang knoxHuang Jul 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

但是这样如果记录了 waitingFullscreen,如何知道是 fullscreen 还是 exitfullscreen ?
还是需要记录 enable 的状态的

Copy link
Member

@pandamicro pandamicro Jul 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loadedmetadata 之前怎么可能已经全屏了呢?

@pandamicro pandamicro merged commit 576560a into cocos:v2.2.0 Jul 10, 2019
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants