mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
VideoPlayer should accpet asset object (#2722)
This commit is contained in:
@@ -155,8 +155,11 @@ var VideoPlayer = cc.Class({
|
||||
return this._clip;
|
||||
},
|
||||
set: function (value) {
|
||||
if (typeof value !== 'string')
|
||||
value = '';
|
||||
if (typeof value === 'string') {
|
||||
// backward compatibility since 1.10
|
||||
cc.errorID(8401, 'cc.VideoPlayer', 'cc.Asset', 'Asset', 'cc.Asset', 'video');
|
||||
value = { nativeUrl: value };
|
||||
}
|
||||
this._clip = value;
|
||||
this._updateVideoSource();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user