@momo2555/koppeliajs 0.0.124 → 0.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/koppelia.js +1 -0
- package/dist/scripts/play.d.ts +1 -2
- package/dist/scripts/play.js +9 -10
- package/package.json +1 -1
package/dist/scripts/koppelia.js
CHANGED
|
@@ -149,6 +149,7 @@ export class Koppelia {
|
|
|
149
149
|
getCuurentPlayRequest.setRequest("getCurrentPlay");
|
|
150
150
|
getCuurentPlayRequest.setDestination(PeerType.MASTER, "");
|
|
151
151
|
this._console.sendMessage(getCuurentPlayRequest, (response) => {
|
|
152
|
+
console.log(response.toObject());
|
|
152
153
|
let playData = response.getParam("play", {});
|
|
153
154
|
let playId = response.getParam("playId", "");
|
|
154
155
|
let play = new Play(this._console, playId, playData);
|
package/dist/scripts/play.d.ts
CHANGED
|
@@ -3,14 +3,13 @@ import type { MediaResponseData } from "./console.js";
|
|
|
3
3
|
export declare class Play {
|
|
4
4
|
private _playCreationDate;
|
|
5
5
|
private _playCreatorId;
|
|
6
|
-
private _playFileName;
|
|
7
6
|
private _playGameId;
|
|
8
7
|
private _playIsPrivate;
|
|
9
8
|
private _playImagebase64;
|
|
10
9
|
private _playMedias;
|
|
11
10
|
private _playName;
|
|
12
11
|
private _playId;
|
|
13
|
-
private
|
|
12
|
+
private _playFileName;
|
|
14
13
|
private _console;
|
|
15
14
|
private _refreshed;
|
|
16
15
|
constructor(console: Console, playId: string, playRawObj: {
|
package/dist/scripts/play.js
CHANGED
|
@@ -3,27 +3,26 @@ import { Message, PeerType } from "./message.js";
|
|
|
3
3
|
export class Play {
|
|
4
4
|
_playCreationDate = "";
|
|
5
5
|
_playCreatorId = "";
|
|
6
|
-
_playFileName = "";
|
|
7
6
|
_playGameId = "";
|
|
8
7
|
_playIsPrivate = "";
|
|
9
8
|
_playImagebase64 = "";
|
|
10
9
|
_playMedias = [];
|
|
11
10
|
_playName = "";
|
|
12
11
|
_playId = "";
|
|
13
|
-
|
|
12
|
+
_playFileName = "";
|
|
14
13
|
_console;
|
|
15
14
|
_refreshed = true;
|
|
16
15
|
constructor(console, playId, playRawObj) {
|
|
17
16
|
this._console = console;
|
|
18
17
|
this._playId = playId;
|
|
19
|
-
if (playRawObj.
|
|
20
|
-
this._playName = playRawObj.
|
|
18
|
+
if (playRawObj.play_name !== undefined) {
|
|
19
|
+
this._playName = playRawObj.play_name;
|
|
21
20
|
}
|
|
22
|
-
if (playRawObj.
|
|
23
|
-
this._playGameId = playRawObj.
|
|
21
|
+
if (playRawObj.play_game_id !== undefined) {
|
|
22
|
+
this._playGameId = playRawObj.play_game_id;
|
|
24
23
|
}
|
|
25
|
-
if (playRawObj.
|
|
26
|
-
this.
|
|
24
|
+
if (playRawObj.play_file_name !== undefined) {
|
|
25
|
+
this._playFileName = playRawObj.play_file_name;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
getPlayMediaPath(mediaName) {
|
|
@@ -38,13 +37,13 @@ export class Play {
|
|
|
38
37
|
return await this._console.getMedia(mediaPath);
|
|
39
38
|
}
|
|
40
39
|
async getMediaData() {
|
|
41
|
-
return await this.getMediaContent(this.
|
|
40
|
+
return await this.getMediaContent(this._playFileName);
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Get the data of the play
|
|
45
44
|
*/
|
|
46
45
|
get data() {
|
|
47
|
-
return this.
|
|
46
|
+
return this._playFileName;
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
49
|
* Get the id of the play
|