-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into fix-contributor-guidlines
- Loading branch information
Showing
7 changed files
with
110 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,6 @@ export default class PublicStreamSidePanel extends Component<Args> { | |
@tracked showChat = false; | ||
@tracked showRoomChat = false; | ||
@tracked showVideoRoom = false; | ||
@tracked languageList: any = []; | ||
|
||
@tracked translationChannels = [{ | ||
id : '0', | ||
|
@@ -110,18 +109,9 @@ export default class PublicStreamSidePanel extends Component<Args> { | |
} | ||
|
||
@action | ||
switchLanguage(channel: any): void { | ||
this.selectingLanguage.setLanguage(channel.url); | ||
switchLanguage(url: string): void { | ||
this.selectingLanguage.setLanguage(url); | ||
this.selectingLanguage.updateTranslationYTId(); | ||
this.selectingLanguage.setName(channel.name); | ||
} | ||
|
||
@action | ||
switchRoom(stream: any) { | ||
if (this.selectingLanguage.getTranslationRoomId() !== stream.id) { | ||
this.selectingLanguage.setName(null); | ||
} | ||
this.selectingLanguage.setTranslationRoomId(stream.id) | ||
} | ||
|
||
@action | ||
|
@@ -148,22 +138,14 @@ export default class PublicStreamSidePanel extends Component<Args> { | |
isGlobalEventRoom : rooms.data.filter((room: any) => room.relationships['video-stream'].data ? room.relationships['video-stream'].data.id === stream.id : null).map((room: any) => room.attributes['is-global-event-room'])[0], | ||
chatRoomName : rooms.data.filter((room: any) => room.relationships['video-stream'].data ? room.relationships['video-stream'].data.id === stream.id : null).map((room: any) => room.attributes['chat-room-name'])[0], | ||
microlocationId : rooms.data.filter((room: any) => room.relationships['video-stream'].data ? room.relationships['video-stream'].data.id === stream.id : null).map((room: any) => room.id)[0], | ||
hash : stringHashCode(stream.attributes.name + stream.id), | ||
translations : [] | ||
})).forEach((stream: any) => { | ||
hash : stringHashCode(stream.attributes.name + stream.id) | ||
})).forEach(async(stream: any) => { | ||
this.addStream(stream) | ||
}); | ||
const languageLists: any = []; | ||
Promise.all(this.streams.map(async(stream: any) => { | ||
const res = await this.fetchTranslationChannels(stream.id); | ||
const item = { | ||
streamId: stream.id | ||
} | ||
languageLists.push(item); | ||
stream.translations = res; | ||
})).then(() => { | ||
this.languageList = languageLists; | ||
}) | ||
this.streams.forEach(async(stream: any) => { | ||
const res = await this.fetchTranslationChannels(stream.id) | ||
stream.translations = res | ||
}); | ||
} catch (e) { | ||
console.error('Error while loading rooms in video stream', e); | ||
} | ||
|
@@ -183,9 +165,4 @@ export default class PublicStreamSidePanel extends Component<Args> { | |
this.loading = false; | ||
this.streams = [...this.streams]; | ||
} | ||
|
||
@computed('[email protected]') | ||
get streamList() { | ||
return this.streams; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.