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
@@ -3,6 +3,14 @@ id: 5e6a54a558d3af90110a60a0
|
||||
title: 'Introduction: Why Program?'
|
||||
challengeType: 11
|
||||
videoId: 3muQV-Im3Z0
|
||||
bilibiliIds:
|
||||
aid: 206882253
|
||||
bvid: BV1Fh411z7tr
|
||||
cid: 376314257
|
||||
videoLocaleIds:
|
||||
espanol: 3muQV-Im3Z0
|
||||
italian: 3muQV-Im3Z0
|
||||
portuguese: 3muQV-Im3Z0
|
||||
dashedName: introduction-why-program
|
||||
---
|
||||
|
||||
|
@@ -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