diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-02 18:30:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-02 18:30:26 +0200 |
commit | c47106315ae3c403239cda29c49b4bba51ddccb2 (patch) | |
tree | 526d2f3ba284dde6bc8d83699c0a78e86d7860eb /client/src/standalone/player | |
parent | f421fa06ada7bb01d91142cc8211a65e2b390d7b (diff) | |
download | PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.tar.gz PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.tar.zst PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.zip |
tslint update
Diffstat (limited to 'client/src/standalone/player')
-rw-r--r-- | client/src/standalone/player/definitions.ts | 4 | ||||
-rw-r--r-- | client/src/standalone/player/events.ts | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/client/src/standalone/player/definitions.ts b/client/src/standalone/player/definitions.ts index 7f9ef9b6f..afd10541b 100644 --- a/client/src/standalone/player/definitions.ts +++ b/client/src/standalone/player/definitions.ts | |||
@@ -1,6 +1,4 @@ | |||
1 | export interface EventHandler<T> { | 1 | export type EventHandler<T> = (ev: T) => void |
2 | (ev: T): void | ||
3 | } | ||
4 | 2 | ||
5 | export type PlayerEventType = | 3 | export type PlayerEventType = |
6 | 'pause' | 'play' | | 4 | 'pause' | 'play' | |
diff --git a/client/src/standalone/player/events.ts b/client/src/standalone/player/events.ts index f1639ef19..28a13c727 100644 --- a/client/src/standalone/player/events.ts +++ b/client/src/standalone/player/events.ts | |||
@@ -13,13 +13,13 @@ export class EventRegistrar { | |||
13 | private eventRegistrations: PlayerEventRegistrationMap = {} | 13 | private eventRegistrations: PlayerEventRegistrationMap = {} |
14 | 14 | ||
15 | public bindToChannel (channel: Channel.MessagingChannel) { | 15 | public bindToChannel (channel: Channel.MessagingChannel) { |
16 | for (let name of Object.keys(this.eventRegistrations)) { | 16 | for (const name of Object.keys(this.eventRegistrations)) { |
17 | channel.bind(name, (txn, params) => this.fire(name, params)) | 17 | channel.bind(name, (txn, params) => this.fire(name, params)) |
18 | } | 18 | } |
19 | } | 19 | } |
20 | 20 | ||
21 | public registerTypes (names: string[]) { | 21 | public registerTypes (names: string[]) { |
22 | for (let name of names) { | 22 | for (const name of names) { |
23 | this.eventRegistrations[ name ] = { registrations: [] } | 23 | this.eventRegistrations[ name ] = { registrations: [] } |
24 | } | 24 | } |
25 | } | 25 | } |