title: Difference of module in browser and Node.js
body: <p>The code from this repository <a href="https://github.com/goldvideo/demuxer/blob/master/doc/examples/demux-ts.html" rel="nofollow noreferrer">Video Demuxer</a> works very good in the browser. Shouldn't it work with the same syntax in a Node .mjs file?</p>
  <pre><code>&lt;script type=&quot;module&quot;&gt;
          // ES Module import
          import { TSDemux, Events } from '../../dist/demuxer.ts.esm.js';
          // import { TSDemux, Events } from '../../dist/demuxer.all.esm.js';
          let tsUrl = './h265_aac_1_16000.ts';
  
          fetch(tsUrl).then((res) =&gt; {
              res.arrayBuffer().then((bytes) =&gt; {
                  let demux = new TSDemux({
                      debug: true // if env is production, debug should be false or not specified.
                  });
  
                  demux.on(Events.DEMUX_DATA, (e) =&gt; {
                      console.log(e)
  
                      // if (e.stream_type === 15) {
                      //     console.log(e)
                      // }
                  });
  
                  demux.on(Events.DONE, (e) =&gt; {
                      // consumed &amp; flushed all pipe buffer.
                  });
  
                  // buffer -&gt; video bytes ArrayBuffer 
                  demux.push(bytes, {
                      done: true
                  });
              });
          })
      &lt;/script&gt;
  </code></pre>
  <p>what am I doing wrong?</p>