feat: localize videos (#42869)
* refactor: separate out VideoPlayer component * feat: support bilibili videos * feat(client): allow localized videos to be shown * fix: remove add subtitles CTA * feat: add locale ids for Why Program?
This commit is contained in:
committed by
GitHub
parent
48f2c02c5d
commit
2b6bef08ae
@ -58,6 +58,22 @@ const schema = Joi.object()
|
||||
is: challengeTypes.video,
|
||||
then: Joi.string().required()
|
||||
}),
|
||||
videoLocaleIds: Joi.when('challengeType', {
|
||||
is: challengeTypes.video,
|
||||
then: Joi.object().keys({
|
||||
espanol: Joi.string(),
|
||||
italian: Joi.string(),
|
||||
portuguese: Joi.string()
|
||||
})
|
||||
}),
|
||||
bilibiliIds: Joi.when('challengeType', {
|
||||
is: challengeTypes.video,
|
||||
then: Joi.object().keys({
|
||||
aid: Joi.number().required(),
|
||||
bvid: Joi.string().required(),
|
||||
cid: Joi.number().required()
|
||||
})
|
||||
}),
|
||||
question: Joi.object().keys({
|
||||
text: Joi.string().required(),
|
||||
answers: Joi.array().items(Joi.string()).required(),
|
||||
|
Reference in New Issue
Block a user