mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 15:42:39 +08:00
improve jsb-videoplayer (#7797)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"ver": "1.0.0",
|
||||
"importer": "video-clip",
|
||||
"imported": true,
|
||||
"uuid": "2be36297-9abb-4fee-8049-9ed5e271da8a",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
'use strict';
|
||||
|
||||
if (cc.internal.VideoPlayer) {
|
||||
|
||||
|
||||
const { EventType } = cc.internal.VideoPlayer;
|
||||
|
||||
let vec3 = cc.Vec3;
|
||||
@@ -105,6 +105,9 @@ if (cc.internal.VideoPlayer) {
|
||||
}
|
||||
|
||||
getDuration () {
|
||||
if (!this.video) {
|
||||
return -1;
|
||||
}
|
||||
return this.video.duration();
|
||||
}
|
||||
|
||||
@@ -245,4 +248,4 @@ if (cc.internal.VideoPlayer) {
|
||||
this._forceUpdate = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user