Skip to content

Commit dad75c6

Browse files
authored
Update readme.md
1 parent 69b4bd3 commit dad75c6

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

readme.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#MPC-HC Control
1+
# MPC-HC Control
22

33
Basic control over [Media Player Classic - Home Cinema](https://mpc-hc.org/) via http api.
44

@@ -9,8 +9,8 @@ Enable web interface in mpc-hc settings.
99

1010
## Usage
1111

12-
```
13-
const {MpcControl} = require("../lib/index");
12+
```ts
13+
const {MpcControl} = require("mpc-hc-control");
1414

1515
const mpcApi = new MpcControl("localhost", 13579);
1616
mpcApi.openFile("c:\\video.mkv"));
@@ -20,93 +20,93 @@ mpcApi.setVolume(75);
2020
## Methods list
2121

2222
Basic methods list:
23-
```
23+
```ts
2424
/**
2525
* @filePath - path to video file
2626
*/
2727
openFile(filePath: string): Promise<any>;
2828
```
2929

30-
```
30+
```ts
3131
isPlaying(): Promise<boolean>
3232
```
3333

34-
```
34+
```ts
3535
isPaused(): Promise<boolean>
3636
```
3737

38-
```
38+
```ts
3939
isStopped(): Promise<boolean>
4040
```
4141

42-
```
42+
```ts
4343
isMuted(): Promise<boolean>
4444
```
4545

46-
```
46+
```ts
4747
getVolume(): Promise<number>
4848
```
4949

50-
```
50+
```ts
5151
getPosition(): Promise<IPositionInfo>
5252
```
5353

54-
```
54+
```ts
5555
play(): Promise<void>
5656
```
5757

58-
```
58+
```ts
5959
pause(): Promise<void>
6060
```
6161

62-
```
62+
```ts
6363
togglePlay(): Promise<void>
6464
```
6565

66-
```
66+
```ts
6767
stop(): Promise<boolean>
6868
```
6969

70-
```
70+
```ts
7171
toggleFullscreen(): Promise<void>
7272
```
7373

74-
```
74+
```ts
7575
/**
7676
* @position - new position in ms
7777
*/
7878
seek(position: number): Promise<void>
7979
```
8080

81-
```
81+
```ts
8282
/**
8383
* @delta - delta from current position in ms
8484
*/
8585
async jump(delta: number): Promise<void>
8686
```
8787

88-
```
88+
```ts
8989
skipBack(): Promise<void>
9090
```
9191

9292
```
9393
skipForward(): Promise<void>
9494
```
9595

96-
```
96+
```ts
9797
/**
9898
* @volume - new volume in percents
9999
*/
100100
setVolume(volume: number): Promise<void>
101101
```
102102

103-
```
103+
```ts
104104
toggleMute(): Promise<void>
105105
```
106106

107107
Also you can use:
108108

109-
```
109+
```ts
110110
/**
111111
* @commandId - any mpc-hc supported command from commands/mpcCommands.ts
112112
* @data - additional data provided in to api call

0 commit comments

Comments
 (0)