diff options
| author | bob <bcz@cs.brown.edu> | 2019-07-12 18:06:34 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-07-12 18:06:34 -0400 |
| commit | 0c4fe96495ea73c16dcf189b09dbceb44943b8ba (patch) | |
| tree | 50fea1b1628cbe89e787679e1ad88164dbdf97b9 /src/client/views/collections/CollectionSubView.tsx | |
| parent | 6a477918f2f16bdc023c76d6a145bb6435e918a6 (diff) | |
enabled youtube play controls. fixed youtube video playing .
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index b2c3fb7d0..71f1908f0 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -197,7 +197,7 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) { .then(result => { let type = result["content-type"]; if (type) { - Docs.Get.DocumentFromType(type, str, { ...options, width: 300, nativeWidth: 300 }) + Docs.Get.DocumentFromType(type, str, { ...options, width: 300, nativeWidth: type.indexOf("video") !== -1 ? 600 : 300 }) .then(doc => doc && this.props.addDocument(doc, false)); } }); @@ -218,7 +218,7 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) { body: formData }).then(async (res: Response) => { (await res.json()).map(action((file: any) => { - let full = { ...options, nativeWidth: 300, width: 300, title: dropFileName }; + let full = { ...options, nativeWidth: type.indexOf("video") !== -1 ? 600 : 300, width: 300, title: dropFileName }; let path = DocServer.prepend(file); Docs.Get.DocumentFromType(type, path, full).then(doc => doc && this.props.addDocument(doc)); })); |
