mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Video player current time display error (#2951)
This commit is contained in:
@@ -82,11 +82,13 @@ _ccsg.VideoPlayer = _ccsg.Node.extend(/** @lends _ccsg.VideoPlayer# */{
|
||||
},
|
||||
|
||||
duration: function () {
|
||||
return this._renderCmd.duration() || -1;
|
||||
var duration = this._renderCmd.duration();
|
||||
return typeof duration === 'number' ? duration : -1;
|
||||
},
|
||||
|
||||
currentTime: function() {
|
||||
return this._renderCmd.currentTime() || -1;
|
||||
var currentTime = this._renderCmd.currentTime();
|
||||
return typeof currentTime === 'number' ? currentTime : -1;
|
||||
},
|
||||
|
||||
createDomElementIfNeeded: function () {
|
||||
|
||||
Reference in New Issue
Block a user