Giter Site home page Giter Site logo

yuyz0112 / syncit Goto Github PK

View Code? Open in Web Editor NEW
320.0 19.0 91.0 6.28 MB

a privacy-first co-browsing tool

Home Page: https://syncit.luckid.io/

JavaScript 3.70% TypeScript 13.55% Svelte 14.71% HTML 1.05% CSS 66.98%
co-browsing screen-sharing remote-control upscope

syncit's Introduction

syncit's People

Contributors

juice10 avatar mujtabachang avatar yuyz0112 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

syncit's Issues

How do you use English locale?

Currently trying out syncit locally using unpkg:

<!doctype html>
<html>
  <head>
    <script src="https://unpkg.com/@syncit/[email protected]/dist/index.js"></script>
    <script src="https://unpkg.com/@syncit/[email protected]/dist/index.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/@syncit/[email protected]/dist/style.css">
  </head>
  <body>
    <p>Test</p>
  </body>
  <script>
    new syncit.Embed({
      target: document.body,
      props: {
        createTransporter({ role, uid }) {
          return new syncitTransporter.LocalStorageTransporter({
            role,
            uid,
          });
        },
      },
    });
  </script>
</html>

How do I set english locale?

大佬 怎么在项目里引入这个库

我import syncit from '@syncit/ui';报"export 'default' (imported as 'syncit') was not found in '@syncit/ui'
使用指南是不是没更新呀 路径改了吗

License?

Hi, whats the License on this project?

How do I control which events are going from the mirror to the source during remote control?

Hi @Yuyz0112 ,

Thank you so much for syncit.

I am trying to customize the events that go back from mirror to the source(for re-evaluation).

From the looks of it, it seems the applyMirrorAction function is responsible for evaluating these actions and applying them to the original source(not sure if this is correct or not) and the rrweb replayer sends them back normally.

However, I cannot find anything which records interaction events on the mirror side after the replayer.enableInteract() is invoked , for sending them back to the source.

Not working on mobile using PeerjsTransporter

The project works locally on PC using LocalStorageTransporter and also Peerjs as server:

Local peerjs settings:

1:1 in same browser works
1:1 in Chrome <> Safari works

But it doesn’t work hosted on EC2 using PeerjsTransport on mobile devices:

Remote peerjs settings:

  • peerHost: 18.197.123.66
  • peerPort: 9000
  • peerPath: /myapp

1:1 does not work in same browser
1:1 does not work in same browser on different devices

Unable to run this project

These are the steps I have tried to run this solution:

  1. npm update -g npm@latest
  2. npm install
  3. npm i @syncit/ui @syncit/transporter
  4. npm i lerna
  5. npx lerna run build

Getting errors, please suggest.

C:\Users\DOM\Downloads\syncit-master>npx lerna run build
lerna notice cli v3.22.1
lerna info Executing command in 3 packages: "yarn run build"
lerna info run Ran npm script 'build' in '@syncit/core' in 4.7s:
yarn run v1.22.17
$ rollup --config
Done in 4.49s.
lerna ERR! yarn run build exited 1 in '@syncit/ui'
lerna ERR! yarn run build stdout:
yarn run v1.22.17
$ rollup -c
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run build stderr:
warning package.json: No license field
[!] Error: Package subpath './compiler.js' is not defined by "exports" in C:\Users\DOM\Downloads\syncit-master\node_modules\svelte\package.json
Error: Package subpath './compiler.js' is not defined by "exports" in C:\Users\DOM\Downloads\syncit-master\node_modules\svelte\package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:453:9)
at packageExportsResolve (node:internal/modules/esm/resolve:729:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\DOM\Downloads\syncit-master\node_modules\rollup-plugin-svelte\index.js:11:4)

error Command failed with exit code 1.

lerna ERR! yarn run build exited 1 in '@syncit/ui'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.

Can syncit be used with socket?

Hello, great developer, can syncit follow rrweb to connect with socket? Why must peerjs be used to realize remote control?

Update to the guide

Thank you for such great library @Yuyz0112
Looks like, things started working when I follow the below structure

import {Embed, App} from '@syncit/ui';
import '@syncit/ui/dist/style.css';
import { LocalStorageTransporter } from '@syncit/transporter';

new Embed({
    target: document.body,
    props: {
        createTransporter({ role, uid }) {
            return new LocalStorageTransporter({
                role,
                uid,
            });
        },
    },
});
new App({
    target: document.body,
    props: {
        createTransporter({ role, uid }) {
            return new LocalStorageTransporter({
                role,
                uid,
            });
        },
    },
});

Or else it raises syncit undefined or Embed Undefined.

Also how to change the language from Mandarin to English?

Error: 'default' is not exported by node_modules/@syncit/ui/dist/index.mjs

Errorr building with TS, after import ...

> vue-tsc --noEmit && vite build

vite v2.9.14 building for production...
transforming (1177) node_modules/lodash-es/seq.jsUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification
✓ 1339 modules transformed.
'default' is not exported by node_modules/@syncit/ui/dist/index.mjs, imported by 

1: import syncit from '@syncit/ui';
   ^
2: import '@syncit/ui/dist/style.css';
3: import { LocalStorageTransporter } from '@syncit/transporter';
error during build:
Error: 'default' is not exported by node_modules/@syncit/ui/dist/index.mjs, imported by 

如果需要远程整个桌面完全控制,而不仅仅是控制web页面时怎么办?

如果是web页面控制可以通过dom得到点击对象及其位置,再得到点击事件后一起传给对端重建,从而避免抓屏转视频流传给对端的方式。我的问题是: 如果需要远程控制整个桌面,而不仅仅是控制web页面时,有什么好的方法可以在控制端通过浏览器,远程控制源端整个桌面进行操作? thanks

Stream active session to 1:n users

Currently it's possible to connect one source with one mirror 1:1. For the future it would be great to have 1 source and n mirrors 1:n.

I tested and it's not possible to have > 1 mirrors. You can enter a session in a n tabs, but only the latest/newest mirror keeps receiving the event stream.

Highly appreciated feature.

初始化Cannot read property 'Embed' of undefined

页面初始化化时调用new syncit.Embed 报错
报错信息: TypeError: Cannot read property 'Embed' of undefined
代码如下:<script> import syncit from '@syncit/ui/dist/index' import '@syncit/ui/dist/style.css' import { LocalStorageTransporter } from '@syncit/transporter' export default { name: 'Test', mounted() { new syncit.Embed({ target: document.body, props: { createTransporter() { return new LocalStorageTransporter({ role: '11', uid: '22' }) } } }) } } </script>

Not working with Angular application

Hi Team, I tried the implementing syncit with a angular application using the User Guide. I am getting the below error:
error TS2554: Expected 0 arguments, but got 1. return new LocalStorageTransporter({ role,uid });
Could you please help resolve the issue?
Also, the default labels for buttons are shown in Chinese, is there any option to change to English?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.