From d0f6f9ecfb8ff439acb7819b0f4bc76986fdaa77 Mon Sep 17 00:00:00 2001 From: Carlos Castro Date: Mon, 14 Nov 2016 15:59:27 -0800 Subject: [PATCH 1/3] BotChat AnimationCard support +Supporting short video and gif animation card +Fixing package.json so that project builds fine in VScode --- package.json | 5 +---- src/Attachment.tsx | 37 +++++++++++++++++++++++++++++++++++-- src/BotConnection.ts | 16 +++++++++++++++- 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index a07e9225c0..9819d7c4dd 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "clean": "rm -rf built", "minify": "webpack --optimize-minimize --optimize-dedupe", "start": "http-server -p 8000", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha" }, "repository": { "type": "git", @@ -42,8 +42,5 @@ "ts-loader": "^0.8.2", "typescript": "^2.0.8", "webpack": "^1.13.1" - }, - "scripts": { - "test": "mocha" } } diff --git a/src/Attachment.tsx b/src/Attachment.tsx index 16501fe3e8..879b94951a 100644 --- a/src/Attachment.tsx +++ b/src/Attachment.tsx @@ -45,6 +45,9 @@ export const AttachmentView = (props: { const imageWithOnLoad = (url: string) => props.onImageLoad() } />; + const animationWithOnLoad = (url: string, thumbnailUrl?: string, autoPlay?:boolean, loop?: boolean) => + props.onImageLoad() } />; + const audio = (audioUrl: string, autoPlay?:boolean, loop?: boolean) =>