Compare commits

...
8 Commits
Author SHA1 Message Date
Vanilagy 716b864fbf Bump patch 2025-08-14 10:56:23 +02:00
David P.andGitHub bea53d9a2b Merge pull request #60 from devPablo/main
Fix UrlSource single-byte buffer on Range Request HTTP 200
2025-08-14 03:12:21 +02:00
Pablo Bonilla 4521a65587 Add descriptive comment on why range request response must be skipped 2025-08-13 19:05:03 -06:00
Pablo Bonilla 5c598e35c2 Skip single-byte buffer when reading through UrlSource for range request 2025-08-13 18:22:59 -06:00
Vanilagy c2292c8304 Bump patch 2025-08-13 17:14:19 +02:00
David P.andGitHub 84219b3ed4 Merge pull request #59 from Yukiniro/e_q6qy_i
fix(conversion): fixed using wrong timestamp
2025-08-13 17:13:38 +02:00
Yukiniro 88b0b5f46f fix(conversion): fix sample end timestamp calculation error 2025-08-13 23:06:11 +08:00
Yukiniro 0348eda8a9 fix(conversion): fixed using wrong timestamp when calculating lastCanvasEndTimestamp 2025-08-13 22:48:08 +08:00
5 changed files with 15 additions and 11 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "mediabunny",
"version": "1.7.4",
"version": "1.7.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mediabunny",
"version": "1.7.4",
"version": "1.7.6",
"license": "MPL-2.0",
"workspaces": [
"packages/*"
@@ -5900,9 +5900,9 @@
}
},
"node_modules/mediabunny": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.7.3.tgz",
"integrity": "sha512-wh0bTZ0bLKIdkn0gMMF/uxEVh85Ft/qH1OtUKJO8k5tdqP0RG7rMfoXLZI6r+wZ9VadfQ4xxYZTEallAWZ74jw==",
"version": "1.7.5",
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.7.5.tgz",
"integrity": "sha512-H7dH2KCOzP/QDHaaNmgo52pDOAuHfC0aa9w9XKPOzcY6x923vGE2CTOqO9W/WEmf8DCRKReGwupSlWuq9NMLYg==",
"license": "MPL-2.0",
"peer": true,
"workspaces": [
@@ -9017,7 +9017,7 @@
},
"packages/mp3-encoder": {
"name": "@mediabunny/mp3-encoder",
"version": "1.7.4",
"version": "1.7.6",
"license": "MPL-2.0",
"devDependencies": {
"@types/emscripten": "^1.40.1"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "mediabunny",
"author": "Vanilagy",
"version": "1.7.4",
"version": "1.7.6",
"description": "Pure TypeScript media toolkit for reading, writing, and converting media files, directly in the browser.",
"type": "module",
"workspaces": [
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/mp3-encoder",
"author": "Vanilagy",
"version": "1.7.4",
"version": "1.7.6",
"description": "MP3 encoder extension for Mediabunny, based on LAME.",
"main": "./dist/bundles/mediabunny-mp3-encoder.mjs",
"module": "./dist/bundles/mediabunny-mp3-encoder.mjs",
+2 -2
View File
@@ -671,7 +671,7 @@ export class Conversion {
}
let adjustedSampleTimestamp = Math.max(timestamp - this._startTimestamp, 0);
lastCanvasEndTimestamp = timestamp + duration;
lastCanvasEndTimestamp = adjustedSampleTimestamp + duration;
if (frameRate !== undefined) {
// Logic for skipping/repeating frames when a frame rate is set
@@ -757,7 +757,7 @@ export class Conversion {
}
let adjustedSampleTimestamp = Math.max(sample.timestamp - this._startTimestamp, 0);
lastSampleEndTimestamp = sample.timestamp + sample.duration;
lastSampleEndTimestamp = adjustedSampleTimestamp + sample.duration;
if (frameRate !== undefined) {
// Logic for skipping/repeating frames when a frame rate is set
+5 -1
View File
@@ -314,7 +314,11 @@ export class UrlSource extends Source {
} else if (rangeResponse.status === 200) {
// The server just returned the whole thing
this._fullData = await rangeResponse.arrayBuffer();
return this._fullData.byteLength;
if (this._fullData.byteLength !== 1) {
return this._fullData.byteLength;
} else {
// The server responded with 200, but returned only the requested range, so skip the response
}
}
// If the range request didn't provide the size, make a full GET request