diff --git a/src/component/internal/messages.ts b/src/component/internal/messages.ts index 3b1a7e3f..6c5994a6 100644 --- a/src/component/internal/messages.ts +++ b/src/component/internal/messages.ts @@ -69,7 +69,7 @@ export class NekoMessages extends EventEmitter { Vue.set(this.state.control, 'implicit_hosting', conf.implicit_hosting) for (const id in conf.members) { - this[EVENT.MEMBER_CREATED](conf.members[id]) + this[EVENT.SESSION_CREATED](conf.members[id]) } this[EVENT.SCREEN_UPDATED](conf.screen_size) @@ -123,26 +123,26 @@ export class NekoMessages extends EventEmitter { // Member Events ///////////////////////////// - protected [EVENT.MEMBER_CREATED]({ id, ...data }: message.MemberData) { - this._log.debug('EVENT.MEMBER_CREATED', id) + protected [EVENT.SESSION_CREATED]({ id, ...data }: message.MemberData) { + this._log.debug('EVENT.SESSION_CREATED', id) Vue.set(this.state.members, id, data) this.emit('member.created', id) } - protected [EVENT.MEMBER_DELETED]({ id }: message.MemberID) { - this._log.debug('EVENT.MEMBER_DELETED', id) + protected [EVENT.SESSION_DELETED]({ id }: message.MemberID) { + this._log.debug('EVENT.SESSION_DELETED', id) Vue.delete(this.state.members, id) this.emit('member.deleted', id) } - protected [EVENT.MEMBER_PROFILE]({ id, ...profile }: message.MemberProfile) { - this._log.debug('EVENT.MEMBER_PROFILE', id) + protected [EVENT.SESSION_PROFILE]({ id, ...profile }: message.MemberProfile) { + this._log.debug('EVENT.SESSION_PROFILE', id) Vue.set(this.state.members[id], 'profile', profile) this.emit('member.updated', id) } - protected [EVENT.MEMBER_STATE]({ id, ...state }: message.SessionState) { - this._log.debug('EVENT.MEMBER_STATE', id) + protected [EVENT.SESSION_STATE]({ id, ...state }: message.SessionState) { + this._log.debug('EVENT.SESSION_STATE', id) Vue.set(this.state.members[id], 'state', state) this.emit('member.updated', id) } diff --git a/src/component/types/events.ts b/src/component/types/events.ts index ef6854ee..113c0a17 100644 --- a/src/component/types/events.ts +++ b/src/component/types/events.ts @@ -8,10 +8,10 @@ export const SIGNAL_PROVIDE = 'signal/provide' export const SIGNAL_CANDIDATE = 'signal/candidate' export const SIGNAL_VIDEO = 'signal/video' -export const MEMBER_CREATED = 'member/created' -export const MEMBER_DELETED = 'member/deleted' -export const MEMBER_PROFILE = 'member/profile' -export const MEMBER_STATE = 'member/state' +export const SESSION_CREATED = 'session/created' +export const SESSION_DELETED = 'session/deleted' +export const SESSION_PROFILE = 'session/profile' +export const SESSION_STATE = 'session/state' export const CONTROL_HOST = 'control/host' export const CONTROL_RELEASE = 'control/release'