aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/newlightbox/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/newlightbox/components')
-rw-r--r--src/client/views/newlightbox/components/Recommendation/Recommendation.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/newlightbox/components/Recommendation/Recommendation.tsx b/src/client/views/newlightbox/components/Recommendation/Recommendation.tsx
index 96846673b..23027808f 100644
--- a/src/client/views/newlightbox/components/Recommendation/Recommendation.tsx
+++ b/src/client/views/newlightbox/components/Recommendation/Recommendation.tsx
@@ -19,17 +19,19 @@ export const Recommendation = (props: IRecommendation) => {
if (source == 'Dash' && docId) {
const docView = DocumentManager.Instance.getDocumentViewsById(docId).lastElement();
if (docView) {
- doc = docView.rootDoc;
+ doc = docView.Document;
}
} else if (data) {
switch (type) {
case 'YouTube':
console.log('create ', type, 'document');
- doc = Docs.Create.VideoDocument(data, { title: title, _width: 400, _height: 315, transcript });
+ doc = Docs.Create.VideoDocument(data, { title: title, _width: 400, _height: 315 });
+ doc.transcript = transcript ? JSON.stringify(transcript) : undefined;
break;
case 'Video':
console.log('create ', type, 'document');
- doc = Docs.Create.VideoDocument(data, { title: title, _width: 400, _height: 315, transcript });
+ doc = Docs.Create.VideoDocument(data, { title: title, _width: 400, _height: 315 });
+ doc.transcript = transcript ? JSON.stringify(transcript) : undefined;
break;
case 'Webpage':
console.log('create ', type, 'document');