Skip to content

Commit

Permalink
Move to 1.1.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
palemieux committed Jul 23, 2019
1 parent 439c423 commit 8d45889
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUNTIME DEPENDENCIES

(required) [sax-js 1.2.1](https://www.npmjs.com/package/sax)

Rendering to HTML5 requires a browser environment, but parsing an IMSC1 document and tranforming it into ISDs does not.
Rendering to HTML5 requires a browser environment, but parsing an IMSC document and transforming it into ISDs does not.



Expand Down Expand Up @@ -73,13 +73,13 @@ ARCHITECTURE
API
---

imscJS renders an IMSC1 document in three distinct steps:
imscJS renders an IMSC document in three distinct steps:

* `fromXML(xmlstring, errorHandler, metadataHandler)` parses the document and returns a TT object. The latter contains opaque representation of the document and exposes the method `getMediaTimeEvents()` that returns a list of time offsets (in seconds) of the ISD, i.e. the points in time where the visual representation of the document change.

* `generateISD(tt, offset, errorHandler)` creates a canonical representation of the document (provided as a TT object generated by `fromXML()`) at a point in time (`offset` parameter). This point in time does not have to be one of the values returned by `getMediaTimeEvents()`. For example, given an ISOBMFF sample covering the interval `[a, b[`, `generateISD(tt, offset, errorHandler)` would be called first with `offset = a`, then in turn with offset set to each value of `getMediaTimeEvents()` that fall in the interval `]a, b[`.

* `renderHTML(isd, element, imgResolver, eheight, ewidth, displayForcedOnlyMode, errorHandler, previousISDState, enableRollUp)` renders an `isd` object returned by `generateISD()` into a newly-created `div` element that is appended to the `element`. The `element` must be attached to the DOM. The height and width of the child `div` element are equal to `eheight` and `ewidth` if not null, or `clientWidth` and `clientHeight` of the parent `element` otherwise. Images URIs specified in `smpte:background` attributes are mapped to image resource URLs by the `imgResolver` function. The latter takes the value of the `smpte:background` attribute URI and an `img` DOM element as input and is expected to set the `src` attribute of the `img` DOM element to the absolute URI of the image. `displayForcedOnlyMode` sets the (boolean) value of the IMSC1 displayForcedOnlyMode parameter. `enableRollUp` enables roll-up as specified in CEA 708. `previousISDState` maintains states across calls, e.g. for roll-up processing.
* `renderHTML(isd, element, imgResolver, eheight, ewidth, displayForcedOnlyMode, errorHandler, previousISDState, enableRollUp)` renders an `isd` object returned by `generateISD()` into a newly-created `div` element that is appended to the `element`. The `element` must be attached to the DOM. The height and width of the child `div` element are equal to `eheight` and `ewidth` if not null, or `clientWidth` and `clientHeight` of the parent `element` otherwise. Images URIs specified in `smpte:background` attributes are mapped to image resource URLs by the `imgResolver` function. The latter takes the value of the `smpte:background` attribute URI and an `img` DOM element as input and is expected to set the `src` attribute of the `img` DOM element to the absolute URI of the image. `displayForcedOnlyMode` sets the (boolean) value of the IMSC displayForcedOnlyMode parameter. `enableRollUp` enables roll-up as specified in CEA 708. `previousISDState` maintains states across calls, e.g. for roll-up processing.

In each step, the caller can provide an `errorHandler` to be notified of events during processing. The `errorHandler` may define four methods: `info`, `warn`, `error` and `fatal`. Each is called with a string argument describing the event, and will cause processing to terminate if it returns `true`.

Expand All @@ -93,7 +93,7 @@ imscJS consists of the following modules, which can be used in a node
environment using the `require` functionality, or standalone, in which case each module hosts its
definitions under a global name (the token between parantheses):

* `doc.js` (`imscDoc`): parses an IMSC1 document into an in-memory TT object
* `doc.js` (`imscDoc`): parses an IMSC document into an in-memory TT object
* `isd.js` (`imscISD`): generates an ISD object from a TT object
* `html.js` (`imscHTML`): generates an HTML fragment from an ISD object
* `names.js` (`imscNames`): common constants
Expand Down Expand Up @@ -137,7 +137,7 @@ TESTS AND SAMPLES
W3C Test Suite
--------------

imscJS imports the [IMSC1 test suite](https://github.com/w3c/imsc-tests) as a submodule at `src/test/resources/imsc-tests`. The gen-renders.html web app can be used to generate PNG renderings as as well intermediary files from these tests.
imscJS imports the [IMSC test suite](https://github.com/w3c/imsc-tests) as a submodule at `src/test/resources/imsc-tests`. The gen-renders.html web app can be used to generate PNG renderings as as well intermediary files from these tests.


Unit tests
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "imsc",
"description": "Renders IMSC 1.1 documents to HTML5 fragments",
"version": "1.1.0-rc.3",
"description": "Renders IMSC documents to HTML5 fragments",
"version": "1.1.0",
"publishConfig": {
"tag": "dev"
"tag": "latest"
},
"license": "BSD-2-Clause",
"homepage": "https://github.com/sandflow/imscJS",
Expand All @@ -16,6 +16,7 @@
],
"keywords": [
"imsc1",
"imsc1.0.1",
"imsc",
"imsc1.1",
"ebut-tt-d",
Expand Down

0 comments on commit 8d45889

Please sign in to comment.