File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export interface ISoundAttributes {
4848 audioBuffer ?: AudioBuffer ;
4949 arrayBuffer ?: ArrayBuffer ;
5050 duration ?: number ;
51+ seekPercentage : number ;
5152
5253 // callbacks
5354 onLoading ?: IOnProgress ;
@@ -79,7 +80,6 @@ export interface ISound extends ISoundAttributes, ISoundSource {
7980 isConnectToPlayerGain : boolean ;
8081 durationSetManually : boolean ;
8182 elapsedPlayTime : number ;
82- seekPercentage : number ;
8383 // methods
8484 getCurrentTime ( ) : number ;
8585 getDuration ( ) : number ;
@@ -155,6 +155,8 @@ export class PlayerSound implements ISound {
155155
156156 this . loop = soundAttributes . loop || false ;
157157
158+ this . seekPercentage = soundAttributes . seekPercentage || 0 ;
159+
158160 // the user can set the duration manually
159161 // this is usefull if we need to convert the position percentage into seconds but don't want to preload the song
160162 // to get the duration the song has to get preloaded as the duration is a property of the audioBuffer
@@ -245,7 +247,7 @@ export class PlayerSound implements ISound {
245247 }
246248
247249 public getDuration ( ) : number {
248-
250+
249251 return this . duration ;
250252
251253 }
You can’t perform that action at this time.
0 commit comments