# Interface: MediaInterface (/jsdoc/pixi-vn/index/interfaces/MediaInterface)



Defined in: [src/sound/interfaces/MediaInterface.ts:3](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/sound/interfaces/MediaInterface.ts#L3)

Extends [#extends]

* `Pick`\<`Player`, `"blockTime"` | `"disposed"` | `"loaded"` | `"loop"` | `"loopEnd"` | `"loopStart"` | `"mute"` | `"now"` | `"playbackRate"` | `"reverse"` | `"restart"` | `"start"` | `"stop"` | `"chain"` | `"disconnect"` | `"volume"` | `"state"`>

Properties [#properties]

blockTime [#blocktime]

\> **blockTime**: `number`

Defined in: node\_modules/tone/build/esm/core/context/ToneWithContext.d.ts:57

Inherited from [#inherited-from]

`Pick.blockTime`

***

disposed [#disposed]

\> **disposed**: `boolean`

Defined in: node\_modules/tone/build/esm/core/Tone.d.ts:52

Inherited from [#inherited-from-1]

`Pick.disposed`

***

loaded [#loaded]

\> **loaded**: `boolean`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:189

Inherited from [#inherited-from-2]

`Pick.loaded`

***

loop [#loop]

\> **loop**: `boolean`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:163

Inherited from [#inherited-from-3]

`Pick.loop`

***

loopEnd [#loopend]

\> **loopEnd**: `Time`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:149

Inherited from [#inherited-from-4]

`Pick.loopEnd`

***

loopStart [#loopstart]

\> **loopStart**: `Time`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:144

Inherited from [#inherited-from-5]

`Pick.loopStart`

***

mute [#mute]

\> **mute**: `boolean`

Defined in: node\_modules/tone/build/esm/source/Source.d.ts:97

Inherited from [#inherited-from-6]

`Pick.mute`

***

~~muted~~ [#muted]

\> **muted**: `boolean`

Defined in: [src/sound/interfaces/MediaInterface.ts:31](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/sound/interfaces/MediaInterface.ts#L31)

Deprecated [#deprecated]

Use [mute](#mute) instead.

***

paused [#paused]

\> **paused**: `boolean`

Defined in: [src/sound/interfaces/MediaInterface.ts:27](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/sound/interfaces/MediaInterface.ts#L27)

Whether the sound is currently paused.

***

playbackRate [#playbackrate]

\> **playbackRate**: `number`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:174

Inherited from [#inherited-from-7]

`Pick.playbackRate`

***

reverse [#reverse]

\> **reverse**: `boolean`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:184

Inherited from [#inherited-from-8]

`Pick.reverse`

***

~~speed~~ [#speed]

\> **speed**: `number`

Defined in: [src/sound/interfaces/MediaInterface.ts:35](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/sound/interfaces/MediaInterface.ts#L35)

Deprecated [#deprecated-1]

Use [playbackRate](#playbackrate) instead.

***

state [#state]

\> **state**: `BasicPlaybackState`

Defined in: node\_modules/tone/build/esm/source/Source.d.ts:89

Inherited from [#inherited-from-9]

`Pick.state`

***

volume [#volume]

\> **volume**: `Param`\<`"decibels"`>

Defined in: node\_modules/tone/build/esm/source/Source.d.ts:49

The volume of the output in decibels.

Example [#example]

```ts
const source = new Tone.PWMOscillator().toDestination();
source.volume.value = -6;
```

Inherited from [#inherited-from-10]

`Pick.volume`

Methods [#methods]

chain() [#chain]

\> **chain**(...`nodes`): `this`

Defined in: node\_modules/tone/build/esm/core/context/ToneAudioNode.d.ts:125

Connect the output of this node to the rest of the nodes in series.

Parameters [#parameters]

nodes [#nodes]

...`InputNode`\[]

Returns [#returns]

`this`

Example [#example-1]

```ts
const player = new Tone.Player("https://tonejs.github.io/audio/drum-samples/handdrum-loop.mp3");
player.autostart = true;
const filter = new Tone.AutoFilter(4).start();
const distortion = new Tone.Distortion(0.5);
// connect the player to the filter, distortion and then to the master output
player.chain(filter, distortion, Tone.Destination);
```

Inherited from [#inherited-from-11]

`Pick.chain`

***

disconnect() [#disconnect]

\> **disconnect**(`destination?`, `outputNum?`, `inputNum?`): `this`

Defined in: node\_modules/tone/build/esm/core/context/ToneAudioNode.d.ts:114

disconnect the output

Parameters [#parameters-1]

destination? [#destination]

`InputNode`

outputNum? [#outputnum]

`number`

inputNum? [#inputnum]

`number`

Returns [#returns-1]

`this`

Inherited from [#inherited-from-12]

`Pick.disconnect`

***

now() [#now]

\> **now**(): `number`

Defined in: node\_modules/tone/build/esm/core/context/ToneWithContext.d.ts:39

Return the current time of the Context clock plus the lookAhead.

Returns [#returns-2]

`number`

Example [#example-2]

```ts
setInterval(() => {
	console.log(Tone.now());
}, 100);
```

Inherited from [#inherited-from-13]

`Pick.now`

***

restart() [#restart]

\> **restart**(`time?`, `offset?`, `duration?`): `this`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:114

Stop and then restart the player from the beginning (or offset)

Parameters [#parameters-2]

time? [#time]

`number`

When the player should start.

offset? [#offset]

`Time`

The offset from the beginning of the sample to start at.

duration? [#duration]

`Time`

How long the sample should play. If no duration is given,
it will default to the full length of the sample (minus any offset)

Returns [#returns-3]

`this`

Inherited from [#inherited-from-14]

`Pick.restart`

***

start() [#start]

\> **start**(`time?`, `offset?`, `duration?`): `this`

Defined in: node\_modules/tone/build/esm/source/buffer/Player.d.ts:98

Play the buffer at the given startTime. Optionally add an offset
and/or duration which will play the buffer from a position
within the buffer for the given duration.

Parameters [#parameters-3]

time? [#time-1]

`Time`

When the player should start.

offset? [#offset-1]

`Time`

The offset from the beginning of the sample to start at.

duration? [#duration-1]

`Time`

How long the sample should play. If no duration is given, it will default to the full length of the sample (minus any offset)

Returns [#returns-4]

`this`

Inherited from [#inherited-from-15]

`Pick.start`

***

stop() [#stop]

\> **stop**(`time?`): `this`

Defined in: node\_modules/tone/build/esm/source/Source.d.ts:125

Stop the source at the specified time. If no time is given,
stop the source now.

Parameters [#parameters-4]

time? [#time-2]

`Time`

When the source should be stopped.

Returns [#returns-5]

`this`

Example [#example-3]

```ts
const source = new Tone.Oscillator().toDestination();
source.start();
source.stop("+0.5"); // stops the source 0.5 seconds from now
```

Inherited from [#inherited-from-16]

`Pick.stop`
