mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
parent
92e54869e0
commit
c4282817db
8 changed files with 67 additions and 5 deletions
|
|
@ -219,6 +219,22 @@ Seek backward n seconds in the current track.
|
|||
webamp.seekBackward(10);
|
||||
```
|
||||
|
||||
### `seekToTime(seconds)`
|
||||
|
||||
Seek to a given time within the current track.
|
||||
|
||||
```JavaScript
|
||||
webamp.seekToTime(15.5);
|
||||
```
|
||||
|
||||
### `getMediaStatus()`
|
||||
|
||||
Get the current "playing" status. The return value is one of: `"PLAYING"`, `"STOPPED"`, or `"PAUSED"`.
|
||||
|
||||
```JavaScript
|
||||
const isPlaying = webamp.getMediaStatus() === "PLAYING";
|
||||
```
|
||||
|
||||
### `pause(): void`
|
||||
|
||||
Pause the current track.
|
||||
|
|
@ -235,6 +251,14 @@ Play the current track.
|
|||
webamp.play();
|
||||
```
|
||||
|
||||
### `stop(): void`
|
||||
|
||||
Stop the currently playing audio. Equivilant to pressing the "stop" button.
|
||||
|
||||
```JavaScript
|
||||
webamp.stop();
|
||||
```
|
||||
|
||||
### `renderWhenReady(domNode: HTMLElement): Promise<void>`
|
||||
|
||||
Webamp will wait until it has fetched the skin and fully parsed it, and then render itself into a new DOM node at the end of the `<body>` tag.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue