Skip to content

Commit

Permalink
add spec references
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Jan 23, 2023
1 parent f7174e9 commit f575b2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/mp4/emsg.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
var uint8ToCString = require('../utils/string.js').uint8ToCString;

/**
* Parses an emsg box from a uint8 array
* @param {UInt8Array} boxData
* Based on: ISO/IEC 23009 Section: 5.10.3.3
* References:
* https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format
* https://aomediacodec.github.io/id3-emsg/
*
* Takes emsg box data as a uint8 array and returns a emsg box object
* @param {UInt8Array} boxData data from emsg box
* @returns A parsed emsg box object
*/
var parseEmsgBox = function(boxData) {
Expand Down
2 changes: 1 addition & 1 deletion test/mp4-probe.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ QUnit.test('can get ID3 data from a v1 EMSG box', function(assert) {
assert.deepEqual(emsgBoxes[0].data, id3Data, 'got correct ID3 data from v1 emsg');
});

QUnit.test('can get ID3 data from a multiple EMSG boxes', function(assert) {
QUnit.test('can get ID3 data from multiple EMSG boxes', function(assert) {
var v1id3Data = new Uint8Array(id3.id3Tag(id3.id3Frame('PRIV',
id3.stringToCString('priv-owner@example.com'),
id3.stringToInts('foo.bar.id3.com')))
Expand Down

0 comments on commit f575b2a

Please sign in to comment.