The Annotation feature allows you to annotate on a Remote Stream. To support Annotations, you need to enable Canvas Streaming during Room Creation by setting: { canvas: true; }} in the JSON payload. To implement Annotation, you need to add Annotation Toolbar before you can start Annotations.
Table of Contents
Start Annotation
The Enx.startAnnotation()
method is used to start Annotation on a given Stream object.
Class: Enx
Method: Enx.startAnnotation(streamId);
Parameter:
streamId
– StreamId of the Stream Object to be annotated.
Callbacks:
startAnnotationAck
– Acknowledgment to the Annotator when Annotation starts.annotationStarted
– Notification to everyone in the Room when Annotation starts.
Stop Annotation
The Enx.stopAnnotation()
method is used to stop Annotations.
Class: Enx
Method: Enx.stopAnnotation();
– No parameter required
Callbacks:
stoppedAnnotationAck
– Acknowledgment to the Annotator when Annotation stops.annotationStopped
– Notification to everyone in the Room when Annotation stops.
Enx.startAnnotation(streamId); // Start Annotation Enx.stopAnnotation(); // Stop Annotation startAnnotationAck:event=>{ // Acknowlegement to Annotator - Annotation started } annotationStarted:event=>{ // Notification to all - Annotation started } stoppedAnnotationAck:event=>{ // Acknowlegement to Annotator - Annotation stopped } annotationStopped:event=>{ // Notification to all - Annotation stopped }
Error Codes / Exceptions:
Code | Description |
---|---|
5093 | Annotation Access denied. |
5104 | Repeated startAnnotation() call made while Annotations already active in the Room. |
5106 | Repeated startAnnotation() call made while a previous request is in process. |
5108 | Invalid Stream passed to startAnnotation() . |
5109 | Failed to publish Annotation Stream. |
5112 | Annotation support available in Landscape Mode only. |
5094 | Repeated stopAnnotation() call made while a previous request is in process. |