-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(html5): Added captionLocale property and related logic (#20272)
* [captionLocale] - added captionLocale * [captionLocale] - changes in review * [captionLocale] - Added new mutation captionAddLocale and removed captionSetOwner * [captionLocale] - add action validation * [captionLocale] - Changes in review * [captionLocale] - fix update of graphql server * [captionLocale] - merge conflicts
- Loading branch information
Showing
30 changed files
with
247 additions
and
159 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
39 changes: 39 additions & 0 deletions
39
...b-apps/src/main/scala/org/bigbluebutton/core/apps/users/SetUserCaptionLocaleMsgHdlr.scala
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.bigbluebutton.core.apps.users | ||
|
||
import org.bigbluebutton.common2.msgs._ | ||
import org.bigbluebutton.core.apps.RightsManagementTrait | ||
import org.bigbluebutton.core.models.{ UserState, Users2x } | ||
import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter } | ||
|
||
trait SetUserCaptionLocaleMsgHdlr extends RightsManagementTrait { | ||
this: UsersApp => | ||
|
||
val liveMeeting: LiveMeeting | ||
val outGW: OutMsgRouter | ||
|
||
def handleSetUserCaptionLocaleReqMsg(msg: SetUserCaptionLocaleReqMsg): Unit = { | ||
log.info("handleSetUserCaptionLocaleReqMsg: locale={} provider={} userId={}", msg.body.locale, msg.body.provider, msg.header.userId) | ||
|
||
def broadcastUserCaptionLocaleChanged(user: UserState, locale: String, provider: String): Unit = { | ||
val routingChange = Routing.addMsgToClientRouting( | ||
MessageTypes.BROADCAST_TO_MEETING, | ||
liveMeeting.props.meetingProp.intId, user.intId | ||
) | ||
val envelopeChange = BbbCoreEnvelope(UserCaptionLocaleChangedEvtMsg.NAME, routingChange) | ||
val headerChange = BbbClientMsgHeader(UserCaptionLocaleChangedEvtMsg.NAME, liveMeeting.props.meetingProp.intId, user.intId) | ||
|
||
val bodyChange = UserCaptionLocaleChangedEvtMsgBody(locale, provider) | ||
val eventChange = UserCaptionLocaleChangedEvtMsg(headerChange, bodyChange) | ||
val msgEventChange = BbbCommonEnvCoreMsg(envelopeChange, eventChange) | ||
outGW.send(msgEventChange) | ||
} | ||
|
||
for { | ||
user <- Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId) | ||
} yield { | ||
Users2x.setUserCaptionLocale(liveMeeting.users2x, msg.header.userId, msg.body.locale) | ||
broadcastUserCaptionLocaleChanged(user, msg.body.locale, msg.body.provider) | ||
} | ||
|
||
} | ||
} |
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
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.