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