langjie-m-play 0.0.1 → 0.0.2
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/package.json +1 -1
- package/service/MPlay.d.ts +1 -0
- package/service/MPlay.js +5 -0
package/package.json
CHANGED
package/service/MPlay.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare class MPlay {
|
|
|
4
4
|
private readonly serviceType;
|
|
5
5
|
private readonly ctrlIndex;
|
|
6
6
|
private dataGramCallBack;
|
|
7
|
+
static connect(url: string): Promise<void>;
|
|
7
8
|
constructor(instId: string | null, serviceType: ServiceTypeEnum | null, ctrlIndex: number | null);
|
|
8
9
|
subscribeForDatagram(tags: string, fn: (data: Array<Array<string>>) => void): Promise<void>;
|
|
9
10
|
unsubscribeForDatagram(): Promise<void>;
|
package/service/MPlay.js
CHANGED
|
@@ -13,6 +13,11 @@ exports.MPlay = void 0;
|
|
|
13
13
|
const GtcClient_1 = require("./GtcClient");
|
|
14
14
|
const ServiceTypeEnum_1 = require("../domain/enums/ServiceTypeEnum");
|
|
15
15
|
class MPlay {
|
|
16
|
+
static connect(url) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
yield GtcClient_1.GtcClient.init(url);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
constructor(instId, serviceType, ctrlIndex) {
|
|
17
22
|
this.ctrlIndex = 0;
|
|
18
23
|
if (instId) {
|