@gradio/video 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,52 +1,70 @@
1
1
  # @gradio/video
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`065c5b1`](https://github.com/gradio-app/gradio/commit/065c5b163c4badb9d9cbd06d627fb4ba086003e7), [`32b317f`](https://github.com/gradio-app/gradio/commit/32b317f24e3d43f26684bb9f3964f31efd0ea556)]:
8
+ - @gradio/utils@0.3.0
9
+ - @gradio/client@0.12.1
10
+ - @gradio/atoms@0.5.2
11
+ - @gradio/image@0.9.1
12
+ - @gradio/statustracker@0.4.6
13
+ - @gradio/upload@0.7.3
14
+
15
+ ## 0.6.0
16
+
17
+ ### Features
18
+
19
+ - [#7183](https://github.com/gradio-app/gradio/pull/7183) [`49d9c48`](https://github.com/gradio-app/gradio/commit/49d9c48537aa706bf72628e3640389470138bdc6) - [WIP] Refactor file normalization to be in the backend and remove it from the frontend of each component. Thanks [@abidlabs](https://github.com/abidlabs)!
20
+
3
21
  ## 0.5.1
4
22
 
5
23
  ### Features
6
24
 
7
- - [#7274](https://github.com/gradio-app/gradio/pull/7274) [`fdd1521`](https://github.com/gradio-app/gradio/commit/fdd15213c24b9cbc58bbc1b6beb4af7c18f48557) - chore: Change time format (thanks @jjshoots for the independent contribution). Thanks [@arian81](https://github.com/arian81)!
25
+ - [#7274](https://github.com/gradio-app/gradio/pull/7274) [`fdd1521`](https://github.com/gradio-app/gradio/commit/fdd15213c24b9cbc58bbc1b6beb4af7c18f48557) - chore: Change time format (thanks @jjshoots for the independent contribution). Thanks [@arian81](https://github.com/arian81)!
8
26
 
9
27
  ### Fixes
10
28
 
11
- - [#7192](https://github.com/gradio-app/gradio/pull/7192) [`8dd6f4b`](https://github.com/gradio-app/gradio/commit/8dd6f4bc1901792f05cd59e86df7b1dbab692739) - Handle the case where examples is `null` for all components. Thanks [@abidlabs](https://github.com/abidlabs)!
29
+ - [#7192](https://github.com/gradio-app/gradio/pull/7192) [`8dd6f4b`](https://github.com/gradio-app/gradio/commit/8dd6f4bc1901792f05cd59e86df7b1dbab692739) - Handle the case where examples is `null` for all components. Thanks [@abidlabs](https://github.com/abidlabs)!
12
30
 
13
31
  ## 0.5.0
14
32
 
15
33
  ### Features
16
34
 
17
- - [#7104](https://github.com/gradio-app/gradio/pull/7104) [`bc2cdc1`](https://github.com/gradio-app/gradio/commit/bc2cdc1df95b38025486cf76df4a494b66d98585) - Allow download button for interactive Audio and Video components. Thanks [@hannahblair](https://github.com/hannahblair)!
35
+ - [#7104](https://github.com/gradio-app/gradio/pull/7104) [`bc2cdc1`](https://github.com/gradio-app/gradio/commit/bc2cdc1df95b38025486cf76df4a494b66d98585) - Allow download button for interactive Audio and Video components. Thanks [@hannahblair](https://github.com/hannahblair)!
18
36
 
19
37
  ## 0.4.0
20
38
 
21
39
  ### Fixes
22
40
 
23
- - [#6933](https://github.com/gradio-app/gradio/pull/6933) [`9cefd2e`](https://github.com/gradio-app/gradio/commit/9cefd2e90a1d0cc4d3e4e953fc5b9b1a7afb68dd) - Refactor examples so they accept data in the same format as is returned by function, rename `.as_example()` to `.process_example()`. Thanks [@abidlabs](https://github.com/abidlabs)!
24
- - [#7038](https://github.com/gradio-app/gradio/pull/7038) [`6be3c2c`](https://github.com/gradio-app/gradio/commit/6be3c2c47a616c904c8497d1fbef7a851c54d488) - Fix Chatbot custom component template. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
41
+ - [#6933](https://github.com/gradio-app/gradio/pull/6933) [`9cefd2e`](https://github.com/gradio-app/gradio/commit/9cefd2e90a1d0cc4d3e4e953fc5b9b1a7afb68dd) - Refactor examples so they accept data in the same format as is returned by function, rename `.as_example()` to `.process_example()`. Thanks [@abidlabs](https://github.com/abidlabs)!
42
+ - [#7038](https://github.com/gradio-app/gradio/pull/7038) [`6be3c2c`](https://github.com/gradio-app/gradio/commit/6be3c2c47a616c904c8497d1fbef7a851c54d488) - Fix Chatbot custom component template. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
25
43
 
26
44
  ## 0.3.1
27
45
 
28
46
  ### Fixes
29
47
 
30
- - [#6885](https://github.com/gradio-app/gradio/pull/6885) [`640b7fe`](https://github.com/gradio-app/gradio/commit/640b7fe05276e11720b4341cadf088491395e53d) - Fix issue with Webcam Recording. Thanks [@dawoodkhan82](https://github.com/dawoodkhan82)!
48
+ - [#6885](https://github.com/gradio-app/gradio/pull/6885) [`640b7fe`](https://github.com/gradio-app/gradio/commit/640b7fe05276e11720b4341cadf088491395e53d) - Fix issue with Webcam Recording. Thanks [@dawoodkhan82](https://github.com/dawoodkhan82)!
31
49
 
32
50
  ## 0.3.0
33
51
 
34
52
  ### Features
35
53
 
36
- - [#6133](https://github.com/gradio-app/gradio/pull/6133) [`f742d0e`](https://github.com/gradio-app/gradio/commit/f742d0e861c8e25c5d77d9102c9d50f94b0d3383) - Lite: Support AnnotatedImage on Wasm. Thanks [@whitphx](https://github.com/whitphx)!
37
- - [#6897](https://github.com/gradio-app/gradio/pull/6897) [`fb9c6ca`](https://github.com/gradio-app/gradio/commit/fb9c6cacd7ca4598c000f1f97d7d39a8c4463519) - Lite: Chatbot. Thanks [@whitphx](https://github.com/whitphx)!
54
+ - [#6133](https://github.com/gradio-app/gradio/pull/6133) [`f742d0e`](https://github.com/gradio-app/gradio/commit/f742d0e861c8e25c5d77d9102c9d50f94b0d3383) - Lite: Support AnnotatedImage on Wasm. Thanks [@whitphx](https://github.com/whitphx)!
55
+ - [#6897](https://github.com/gradio-app/gradio/pull/6897) [`fb9c6ca`](https://github.com/gradio-app/gradio/commit/fb9c6cacd7ca4598c000f1f97d7d39a8c4463519) - Lite: Chatbot. Thanks [@whitphx](https://github.com/whitphx)!
38
56
 
39
57
  ## 0.2.4
40
58
 
41
59
  ### Features
42
60
 
43
- - [#6854](https://github.com/gradio-app/gradio/pull/6854) [`e528f98`](https://github.com/gradio-app/gradio/commit/e528f98b88f4322f61d315e1770fce0448ca5e26) - chore(deps): update dependency mrmime to v2. Thanks [@renovate](https://github.com/apps/renovate)!
61
+ - [#6854](https://github.com/gradio-app/gradio/pull/6854) [`e528f98`](https://github.com/gradio-app/gradio/commit/e528f98b88f4322f61d315e1770fce0448ca5e26) - chore(deps): update dependency mrmime to v2. Thanks [@renovate](https://github.com/apps/renovate)!
44
62
 
45
63
  ## 0.2.3
46
64
 
47
65
  ### Fixes
48
66
 
49
- - [#6766](https://github.com/gradio-app/gradio/pull/6766) [`73268ee`](https://github.com/gradio-app/gradio/commit/73268ee2e39f23ebdd1e927cb49b8d79c4b9a144) - Improve source selection UX. Thanks [@hannahblair](https://github.com/hannahblair)!
67
+ - [#6766](https://github.com/gradio-app/gradio/pull/6766) [`73268ee`](https://github.com/gradio-app/gradio/commit/73268ee2e39f23ebdd1e927cb49b8d79c4b9a144) - Improve source selection UX. Thanks [@hannahblair](https://github.com/hannahblair)!
50
68
 
51
69
  ## 0.2.2
52
70
 
@@ -311,4 +329,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
311
329
  - @gradio/image@0.1.0
312
330
  - @gradio/utils@0.0.2
313
331
  - @gradio/atoms@0.0.2
314
- - @gradio/upload@0.0.2
332
+ - @gradio/upload@0.0.2
package/Index.svelte CHANGED
@@ -3,7 +3,7 @@
3
3
  <script lang="ts">
4
4
  import type { Gradio, ShareData } from "@gradio/utils";
5
5
 
6
- import { normalise_file, type FileData } from "@gradio/client";
6
+ import type { FileData } from "@gradio/client";
7
7
  import { Block, UploadText } from "@gradio/atoms";
8
8
  import StaticVideo from "./shared/VideoPreview.svelte";
9
9
  import Video from "./shared/InteractiveVideo.svelte";
@@ -24,7 +24,6 @@
24
24
  | ["webcam", "upload"]
25
25
  | ["upload", "webcam"];
26
26
  export let root: string;
27
- export let proxy_url: null | string;
28
27
  export let show_label: boolean;
29
28
  export let loading_status: LoadingStatus;
30
29
  export let height: number | undefined;
@@ -80,8 +79,8 @@
80
79
 
81
80
  $: {
82
81
  if (value != null) {
83
- _video = normalise_file(value.video, root, proxy_url);
84
- _subtitle = normalise_file(value.subtitles, root, proxy_url);
82
+ _video = value.video;
83
+ _subtitle = value.subtitles;
85
84
  } else {
86
85
  _video = null;
87
86
  _subtitle = null;
package/Video.test.ts CHANGED
@@ -41,8 +41,10 @@ describe("Video", () => {
41
41
  loading_status,
42
42
  value: {
43
43
  video: {
44
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
45
- }
44
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
45
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
46
+ },
47
+ subtitles: null
46
48
  },
47
49
  label: "Test Label",
48
50
  root: "foo",
@@ -56,7 +58,7 @@ describe("Video", () => {
56
58
  let vid = getByTestId("Test Label-player") as HTMLVideoElement;
57
59
  assert.equal(
58
60
  vid.src,
59
- "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
61
+ "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
60
62
  );
61
63
  assert.equal(queryAllByText("Test Label").length, 1);
62
64
  });
@@ -67,8 +69,10 @@ describe("Video", () => {
67
69
  loading_status,
68
70
  value: {
69
71
  video: {
70
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
71
- }
72
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
73
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
74
+ },
75
+ subtitles: null
72
76
  },
73
77
  label: "Video Component",
74
78
  root: "foo",
@@ -88,8 +92,10 @@ describe("Video", () => {
88
92
  loading_status,
89
93
  value: {
90
94
  video: {
91
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
92
- }
95
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
96
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
97
+ },
98
+ subtitles: null
93
99
  },
94
100
  root: "foo",
95
101
  proxy_url: null,
@@ -102,7 +108,7 @@ describe("Video", () => {
102
108
  let vid = getByTestId("test-player") as HTMLVideoElement;
103
109
  assert.equal(
104
110
  vid.src,
105
- "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
111
+ "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
106
112
  );
107
113
  });
108
114
 
@@ -113,8 +119,10 @@ describe("Video", () => {
113
119
  interactive: false,
114
120
  value: {
115
121
  video: {
116
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
117
- }
122
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
123
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
124
+ },
125
+ subtitles: null
118
126
  },
119
127
  root: "foo",
120
128
  proxy_url: null,
@@ -135,8 +143,10 @@ describe("Video", () => {
135
143
  loading_status,
136
144
  value: {
137
145
  video: {
138
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
139
- }
146
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
147
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
148
+ },
149
+ subtitles: null
140
150
  },
141
151
  root: "foo",
142
152
  proxy_url: null,
@@ -158,8 +168,10 @@ describe("Video", () => {
158
168
  interactive: false,
159
169
  value: {
160
170
  video: {
161
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
162
- }
171
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
172
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
173
+ },
174
+ subtitles: null
163
175
  },
164
176
  root: "foo",
165
177
  proxy_url: null,
@@ -189,8 +201,10 @@ describe("Video", () => {
189
201
  interactive: true,
190
202
  value: {
191
203
  video: {
192
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
193
- }
204
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
205
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
206
+ },
207
+ subtitles: null
194
208
  },
195
209
  root: "foo",
196
210
  proxy_url: null,
@@ -205,8 +219,10 @@ describe("Video", () => {
205
219
  component.$set({
206
220
  value: {
207
221
  video: {
208
- path: "https://gradio-builds.s3.amazonaws.com/demo-files/audio_sample.wav"
209
- }
222
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
223
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
224
+ },
225
+ subtitles: null
210
226
  }
211
227
  });
212
228
  startButton.dispatchEvent(new Event("loadeddata"));
@@ -215,10 +231,8 @@ describe("Video", () => {
215
231
  test("renders video and download button", async () => {
216
232
  const data = {
217
233
  video: {
218
- path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
219
- },
220
- subtitles: {
221
- path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
234
+ path: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4",
235
+ url: "https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/demo/video_component/files/a.mp4"
222
236
  }
223
237
  };
224
238
  const results = await render(Video, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/video",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -10,14 +10,14 @@
10
10
  "@ffmpeg/ffmpeg": "^0.12.7",
11
11
  "@ffmpeg/util": "^0.12.1",
12
12
  "mrmime": "^2.0.0",
13
- "@gradio/client": "^0.11.0",
13
+ "@gradio/client": "^0.12.1",
14
+ "@gradio/atoms": "^0.5.2",
14
15
  "@gradio/icons": "^0.3.2",
15
- "@gradio/image": "^0.8.0",
16
- "@gradio/statustracker": "^0.4.5",
17
- "@gradio/upload": "^0.7.1",
18
- "@gradio/utils": "^0.2.2",
19
- "@gradio/wasm": "^0.6.0",
20
- "@gradio/atoms": "^0.5.1"
16
+ "@gradio/image": "^0.9.1",
17
+ "@gradio/statustracker": "^0.4.6",
18
+ "@gradio/upload": "^0.7.3",
19
+ "@gradio/utils": "^0.3.0",
20
+ "@gradio/wasm": "^0.6.0"
21
21
  },
22
22
  "exports": {
23
23
  ".": "./index.ts",