Canvas-Designer
Canvas-Designer copied to clipboard
does this work with safari ?
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 ?
Only WebRTC 1.0 compatible browsers are supported:
- Chrome (both desktop and Android)
- Firefox (both desktop and Android)
- Opera (both desktop and Android)
Following are NOT supported:
- Chrome on iOS
- Safari on any platform
- 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);