mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Implement the bulk of the MPEG-TS demuxer, add a bunch of tests, and a few other things
This commit is contained in:
@@ -43,12 +43,14 @@ const extractMetadata = (resource: File | string) => {
|
||||
const object = {
|
||||
'Format': input.getFormat().then(format => format.name),
|
||||
'Full MIME type': input.getMimeType(),
|
||||
'Duration': input.computeDuration().then(duration => `${duration} seconds`),
|
||||
'Starts at': input.getFirstTimestamp().then(start => `${start} seconds`),
|
||||
'Ends at': input.computeDuration().then(duration => `${duration} seconds`),
|
||||
'Tracks': input.getTracks().then(tracks => tracks.map(track => ({
|
||||
'Type': track.type,
|
||||
'Codec': track.codec,
|
||||
'Full codec string': track.getCodecParameterString(),
|
||||
'Duration': track.computeDuration().then(duration => `${duration} seconds`),
|
||||
'Starts at': track.getFirstTimestamp().then(start => `${start} seconds`),
|
||||
'Ends at': track.computeDuration().then(duration => `${duration} seconds`),
|
||||
'Language code': track.languageCode,
|
||||
...(track.isVideoTrack()
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user