8000 修复 undo 的时候,video player 出现报错的问题 by knoxHuang · Pull Request #9360 · cocos/cocos-engine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

修复 undo 的时候,video player 出现报错的问题 #9360

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

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
19 changes: 10 additions & 9 deletions cocos2d/videoplayer/CCVideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,16 @@ let VideoPlayer = cc.Class({
},

_updateVideoSource () {
let url = '';
if (this.resourceType === ResourceType.REMOTE) {
url = this.remoteURL;
}
else if (this._clip) {
url = this._clip.nativeUrl;
if (this._impl) {
let url = '';
if (this.resourceType === ResourceType.REMOTE) {
url = this.remoteURL;
} else if (this._clip) {
url = this._clip.nativeUrl;
}
this._impl.setURL(url, this._mute || this._volume === 0);
this._impl.setKeepAspectRatioEnabled(this.keepAspectRatio);
}
this._impl.setURL(url, this._mute || this._volume === 0);
this._impl.setKeepAspectRatioEnabled(this.keepAspectRatio);
},

onLoad () {
Expand Down Expand Up @@ -452,7 +453,7 @@ let VideoPlayer = cc.Class({
* @param {Boolean} show
*/
setShowRaw (show) {
this._impl.setShowRawFrame(show);
this._impl && this._impl.setShowRawFrame(show);
},

_ccVideoTex : null,
Expand Down
0