@invintusmedia/tomp4 1.0.4 → 1.0.6

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/README.md CHANGED
@@ -66,6 +66,22 @@ info.videoCodec // "H.264/AVC"
66
66
  info.audioCodec // "AAC"
67
67
  ```
68
68
 
69
+ ### progress callback
70
+
71
+ ```js
72
+ const mp4 = await toMp4(url, {
73
+ onProgress: (msg, info) => {
74
+ if (info?.percent !== undefined) {
75
+ console.log(`${info.percent}% - ${msg}`)
76
+ }
77
+ }
78
+ })
79
+ // 10% - Downloading: 10%
80
+ // 50% - Downloaded 5.2 MB
81
+ // 60% - Frames: 300 video, 450 audio
82
+ // 100% - Complete
83
+ ```
84
+
69
85
  ### use the result
70
86
 
71
87
  ```js