@gradio/video 0.3.0 → 0.4.0

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,5 +1,18 @@
1
1
  # @gradio/video
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Fixes
6
+
7
+ - [#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)!
8
+ - [#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)!
9
+
10
+ ## 0.3.1
11
+
12
+ ### Fixes
13
+
14
+ - [#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)!
15
+
3
16
  ## 0.3.0
4
17
 
5
18
  ### Features
package/Example.svelte CHANGED
@@ -1,10 +1,11 @@
1
1
  <script lang="ts">
2
2
  import Video from "./shared/Video.svelte";
3
3
  import { playable } from "./shared/utils";
4
+ import { type FileData } from "@gradio/client";
4
5
 
5
6
  export let type: "gallery" | "table";
6
7
  export let selected = false;
7
- export let value: string;
8
+ export let value: { video: FileData; subtitles: FileData | null } | null;
8
9
  export let samples_dir: string;
9
10
  let video: HTMLVideoElement;
10
11
 
@@ -33,7 +34,7 @@
33
34
  on:loadeddata={init}
34
35
  on:mouseover={video.play.bind(video)}
35
36
  on:mouseout={video.pause.bind(video)}
36
- src={samples_dir + value}
37
+ src={samples_dir + value?.video.path}
37
38
  />
38
39
  </div>
39
40
  {:else}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/video",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -9,17 +9,15 @@
9
9
  "dependencies": {
10
10
  "@ffmpeg/ffmpeg": "^0.12.7",
11
11
  "@ffmpeg/util": "^0.12.1",
12
+ "mrmime": "^2.0.0",
12
13
  "@gradio/atoms": "^0.4.1",
13
- "@gradio/client": "^0.10.0",
14
+ "@gradio/client": "^0.10.1",
14
15
  "@gradio/icons": "^0.3.2",
15
- "@gradio/image": "^0.6.0",
16
+ "@gradio/image": "^0.7.0",
16
17
  "@gradio/statustracker": "^0.4.3",
17
- "@gradio/upload": "^0.5.8",
18
- "@gradio/utils": "^0.2.0",
19
- "@gradio/wasm": "^0.4.1"
20
- },
21
- "devDependencies": {
22
- "mrmime": "^2.0.0"
18
+ "@gradio/upload": "^0.6.1",
19
+ "@gradio/wasm": "^0.5.0",
20
+ "@gradio/utils": "^0.2.0"
23
21
  },
24
22
  "exports": {
25
23
  ".": "./index.ts",
@@ -57,6 +57,12 @@
57
57
  dispatch("change", video);
58
58
  }
59
59
 
60
+ function handle_capture({
61
+ detail
62
+ }: CustomEvent<FileData | any | null>): void {
63
+ dispatch("change", detail);
64
+ }
65
+
60
66
  let dragging = false;
61
67
  $: dispatch("drag", dragging);
62
68
  </script>
@@ -77,11 +83,12 @@
77
83
  </Upload>
78
84
  {:else if active_source === "webcam"}
79
85
  <Webcam
86
+ {root}
80
87
  {mirror_webcam}
81
88
  {include_audio}
82
89
  mode="video"
83
90
  on:error
84
- on:capture={() => dispatch("change")}
91
+ on:capture={handle_capture}
85
92
  on:start_recording
86
93
  on:stop_recording
87
94
  {i18n}