# BinaryImageStream

{% note warn Deprecated %}
This class has been migrated to WslinkImageStream, based on [wslink](https://github.com/kitware/wslink)
When all clients have been migrated to wslink, this class will be removed.
{% endnote %}

## constructor(endpointURL, stillQuality=100, interactiveQuality=50, mimeType='image/jpeg')

Create an instance of a binary image stream over WebSocket.

## enableView(enabled) 

Toggle ON or OFF the streaming of a given view to the client.

## startInteractiveQuality()

Trigger a call on the server to update the image quality to interactive.

## stopInteractiveQuality()

Trigger a call on the server to update the image quality to still.

## updateQuality(stillQuality=100, interactiveQuality=50) 

Update compression setting regarding the still and interactive mode.

## connect({view_id=-1, size=[500,500]})

Establish WebSocket connection with server.

## destroy() 

Remove listener and free resources.

## onImageReady(callback) : subscription

Attach listener for when an image is received.
