Skip to content

Commit d05d49d

Browse files
authored
Add support for RealMedia (#740)
1 parent d8d9cbc commit d05d49d

7 files changed

+18
-1
lines changed

core.js

+9
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,15 @@ export class FileTypeParser {
10211021
};
10221022
}
10231023

1024+
if (this.checkString('.RMF')) {
1025+
return {
1026+
ext: 'rm',
1027+
mime: 'application/vnd.rn-realmedia',
1028+
};
1029+
}
1030+
1031+
// -- 5-byte signatures --
1032+
10241033
if (this.checkString('DRACO')) {
10251034
return {
10261035
ext: 'drc',

fixture/fixture-realmedia-audio.rm

19.3 KB
Binary file not shown.

fixture/fixture-realmedia-video.rm

396 KB
Binary file not shown.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@
234234
"dotm",
235235
"potm",
236236
"pptm",
237-
"jar"
237+
"jar",
238+
"rm"
238239
],
239240
"dependencies": {
240241
"@tokenizer/inflate": "^0.2.6",

readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream.
565565
- [`qcp`](https://en.wikipedia.org/wiki/QCP) - Tagged and chunked data
566566
- [`raf`](https://en.wikipedia.org/wiki/Raw_image_format) - Fujifilm RAW image file
567567
- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) - Archive file
568+
- [`rm`](https://en.wikipedia.org/wiki/RealMedia) - RealMedia
568569
- [`rpm`](https://fileinfo.com/extension/rpm) - Red Hat Package Manager file
569570
- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format
570571
- [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file

supported.js

+2
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export const extensions = [
171171
'potm',
172172
'pptm',
173173
'jar',
174+
'rm',
174175
];
175176

176177
export const mimeTypes = [
@@ -341,4 +342,5 @@ export const mimeTypes = [
341342
'application/vnd.ms-powerpoint.template.macroEnabled.12',
342343
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
343344
'application/java-archive',
345+
'application/vnd.rn-realmedia',
344346
];

test.js

+4
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ const names = {
273273
lz4: [
274274
'fixture',
275275
],
276+
rm: [
277+
'fixture-realmedia-audio',
278+
'fixture-realmedia-video',
279+
],
276280
};
277281

278282
// Define an entry here only if the file type has potential

0 commit comments

Comments
 (0)