Canvas-Designer icon indicating copy to clipboard operation
Canvas-Designer copied to clipboard

does this work with safari ?

Open amikar opened this issue 8 years ago • 1 comments

I am trying to make the connection work with safari but there seems to be a connection issue. The application works fine with chrome and firefox. does webrtc not work with safari ?

amikar avatar Jan 26 '17 17:01 amikar

Only WebRTC 1.0 compatible browsers are supported:

  1. Chrome (both desktop and Android)
  2. Firefox (both desktop and Android)
  3. Opera (both desktop and Android)

Following are NOT supported:

  1. Chrome on iOS
  2. Safari on any platform
  3. IE or MSEdge

To support Safari+IE+MSEdge, you can use socket.io as signaling. In this case, CanvasDesigner will share/sync data using socket.io instead of using WebRTC.

You can check WebSocket usage here:

  • https://github.com/muaz-khan/Canvas-Designer#complete-usage

You can use any method: PHP-XHR-polling; socket.io; websockets; XMPP etc.

Here is socket.io usage:

socketio.on('messgae', function(data) {
    designer.syncData(data);
});

designer.addSyncListener(function(data) {
    socketio.emit('data', data);
});

Or complete usage:

var designer = new CanvasDesigner();

socketio.on('messgae', function(data) {
    designer.syncData(data);
});

designer.addSyncListener(function(data) {
    socketio.emit('data', data);
});

designer.setSelected('pencil');

designer.setTools({
    pencil: true,
    text: true
});

designer.appendTo(document.documentElement);

muaz-khan avatar Jan 26 '17 17:01 muaz-khan