File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,14 @@ export class TNSPlayer extends Observable {
64
64
65
65
public get duration ( ) {
66
66
if ( this . _player ) {
67
- return this . _player . duration ;
67
+ return Math . round ( this . _player . duration * 1000 ) ;
68
68
} else {
69
69
return 0 ;
70
70
}
71
71
}
72
72
73
73
get currentTime ( ) : number {
74
- return this . _player ? this . _player . currentTime : 0 ;
74
+ return this . _player ? Math . round ( this . _player . currentTime * 1000 ) : 0 ;
75
75
}
76
76
77
77
public setAudioFocusManager ( manager : any ) { }
@@ -290,7 +290,7 @@ export class TNSPlayer extends Observable {
290
290
291
291
public async getAudioTrackDuration ( ) {
292
292
try {
293
- const duration = this . _player ? this . _player . duration : 0 ;
293
+ const duration = this . _player ? Math . round ( this . _player . duration * 1000 ) : 0 ;
294
294
return duration ;
295
295
} catch ( ex ) {
296
296
if ( this . errorCallback ) {
You can’t perform that action at this time.
0 commit comments