aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
753 stars 127 forks source link

Chapter implementation (broken) #46

Closed tom-sherman closed 7 years ago

tom-sherman commented 7 years ago

I've started the implantation of the chapters and chapter contents frames but have run into some serious roadblocks.

Tested on the attached file, it's almost like my code isn't being invoked properly.

The following code

new jsmediatags.Reader("./auphonic_chapters_demo.mp3")
  .setTagsToRead("chap")
  .read({
    onSuccess: function(tag) {
      console.log(tag);
    },
    onError: function(error) {
      console.log(':(', error.type, error.info);
    }
  });

along with replacing chap with ctoc outputs:

{ type: 'ID3',
  version: '2.3.0',
  major: 3,
  revision: 0,
  flags:
   { unsynchronisation: false,
     extended_header: false,
     experimental_indicator: false,
     footer_present: false },
  size: 778511,
  tags: {} }

If I run

var jsmediatags = require("../jsmediatags/build2/jsmediatags.js");

new jsmediatags.Reader("./auphonic_chapters_demo.mp3")
  .setTagsToRead(["CHAP", "CTOC"])
  .read({
    onSuccess: function(tag) {
      console.log(tag);
    },
    onError: function(error) {
      console.log(':(', error.type, error.info);
    }
  });

Output:

ctoc
chap
chap
chap
chap
chap
chap
:( parseData Offset 778521 hasn't been loaded yet.

Any ideas?

tom-sherman commented 7 years ago

This is the most idiotic PR every submitted. Completely sleep deprived, will sleep and reopen in the morning