Sync-Sofaco-play streaming video with remote friends!
Sync Sofa (streaming video playback synchronizer extension)
This chrome extension allows multi-user sync streaming video in a fast, simple, and stable way.
Sync Sofa is a full-stack web extension that provides an easy-to-use and stable way to synchronize streaming playback for multiple users. It can improve the experience when users from different locations want to share a video/movie remotely. Currently, the features include:
- 2 party connection: either party can be the host of a sync room and the other can join with connection code.
- sync pause/play: each user pause/play the video, the other side will do the same
- sync play process bar control: the playing time change will also affect another side user
- local video sync: provide two ways to sync your playing of a local video file
Current version
v1.0.9 - update on 14 Aug 2020
own controller
of the playback rate, so please ignore the wrong display of playback rate
.
Add:
- playback rate sync: any side user's change to the playback rate will sync to the other side.
Fix:
- Fix bug of no new bugs
v1.0.8 - update on 8 Aug 2020
Room code
like 0000
or 1234
, We strongly recommend you use uncommon code so that you do not need to change it.
Add:
- allow customized connection code, user can directly connect to peer simply click the start button, without reapplying a new code
- simple built-in chat feature (can be toggled in options page)
- add system notification (can be toggled in options page)
- add connection status budge to extension icon (red-unconnected, yellow-pending connection, green-connecting)
- add a notification for unknown socket disconcerting
- add duplicate connection code notification
Fix:
- Fix bug of no new bugs
Supported list
- Iqiyi
- Youku
- Tencent Cloud
- Tencent Video
- YouTube
- Mango TV
- Local mp4 file via Browser
- Local video file via VLC media player
Setting
Server list
Recently, Many Chinese users said our service is unstable, that is because our default server is located at us, so here is the server list, you can pick the nearest one.
- sync-cn:
https
sync-cn.onns.xyz
- sync-cn-2 [deprecated] (Thanks to @huoranxuanyuan):
https
api.huoranxuanyuan.cn
- sync-cn-3 [Beijing] (Thanks to @liqimore):
https
sync-bj.204800.xyz
- sync-cn-4 [Shanghai] (Thanks to @liqimore):
https
sync-shanghai.204800.xyz
- sync-us:
https
app.ylwang.me
- sync-us-2 [Missouri] (Thanks to @liqimore):
https
sync-us-central.pq02.com
Before setting, check server status here: Sync Sofa (streaming video playback synchronizer extension).
We will be grateful for supporting us to build more server if it is convenient (Cause this project is unprofitable).
Alipay, Wechat pay, Paypal
If you have already built your own server, and wanna share, please tell us!
Options page
There are two ways to visit the options page.
- Right click
Sync Sofa
extension, chooseOptions
. - Left click
Sync Sofa
extension, chooseSetting
icon in the popup page.
Your webpage should be like this:
Refresh video page
After saving options, please also refresh the video page or local mp4 page or http://127.0.0.1:8080/ to make changes to work.
Usage
Notices
the version number
of two clients is consistent.
the server host
of two clients are consistent.
.mp4
file, please enable Allow access to file URLs
in the extension details page.
- Open
chrome://extensions/
, findSync Sofa
, click theDetails
button, enableAllow access to file URLs
. - Right click
Sync Sofa
extension, chooseManage Extensions
, enableAllow access to file URLs
.
multiple versions
of extensions in your browser, please enable one and disable others.
Open a video page
You two don't have to open the same webpage, you play the video via a local .mp4
file and your partner watch it one some video websites, is ok as long as you both watch the same video actually (source providers are different).
In this doc, for example, User A
will watch the video on Bilibili and User B
will do it on Youtube. Here is the webpage:
PS: I'm a fan of Boki, and screenshots have been Gaussian blurred. If there is copyright infringement, please contact us to delete it.
If there are any ads before the video, watch them before the next step.
Request new code
Click the Sync Sofa
extension and then click START
button.
If nothing goes wrong you will receive a message like Room created and room code copied to clipboard
, and the room code
has been copied to your clipboard, send it to your partner.
Start connection
Your partner receives the room code
, click the Sync Sofa
extension, paste it in the input area, and click START
button.
Enjoy yourselves
Now you can play the video, your operations will be synced to your partner. Enjoy yourselves!
VLC support
If you and your partner play video via VLC media player
, Sync Sofa
can also synchronize your operations.
Start VLC on the server with the Web Interface
First, we need to enable controlling VLC via our browser, here is the official documentation:
- Open VLC media player
- Go
Tools → Preferences (select "All" radio-button) → Interface → Main interfaces
, check "Web" - Go
Tools → Preferences (select "All" radio-button) → Interface → Main interfaces → Lua
, setLua HTTP - Password
-
Save
andreopen
VLC media player - Open http://127.0.0.1:8080/ in your browser
Your webpage should be like this:
Open your video
Our extension control VLC
via controlling VLC Web Interface
(http://127.0.0.1:8080/), so next step you should open your local video via VLC Media Player
and see if http://127.0.0.1:8080/ can control the video. If the answer is "yes", go to the next step, otherwise you should check if there are multiple VLC windows
, close the others, and recheck. Your VLC Web Interface
should be like this:
Video title, current time, and total time on the webpage.
Request new code
Open http://127.0.0.1:8080/, click the Sync Sofa
extension, and then click REQUEST NEW CODE
button.
If nothing goes wrong you will receive a message like Room created and room code copied to clipboard
, and the room code
has been copied to your clipboard, send it to your partner.
Start connection
Your partner receives the room code
, clicks the Sync Sofa
extension, paste it in the input area, and clicks START
button.
Enjoy yourselves
Now you can play the video, your operations will be synced to your partner. Enjoy yourselves!
Notice:
Close Controller webpage
After your video is finished, please click STOP
button on Sync Sofa
extension manually or just close http://127.0.0.1:8080/.
Installation
Google Chrome
Install from Chrome Web Store
- Open Sync Sofa - Online Video Synchronizer - Chrome Web Store in your Chrome
- Click
Add to Chrome
button - Choose
Add extension
Install from local .crx file
- Open Github release page
- Download
sync_sofa.[version].crx
, [version] is the number of the latest version - Open
chrome://extensions/
in your Chrome - Turn on
Developer mode
(in the top right corner) - Drag
sync_sofa.[version].crx
into thechrome://extensions/
page - Choose
Add extension
Notices: If the extension is disabled by Chrome, try Install from chrome web store or Install from unpackaged folder.
This extension is not listed in the Chrome Web Store and may have been added without your knowledge.
Install from unpackaged folder
- Download stable version or development version (with new features and some bugs maybe)
- Unzip the
.zip
file you downloaded - Open
chrome://extensions/
in your Chrome - Turn on
Developer mode
(in the top right corner) - Click
Load unpacked
(in the top left corner) - Choose
[download_path]/[unzip folder]/client/chrome_extension
- Click
select
Microsoft Edge:
Install from Microsoft Edge Addons
- Open Sync Sofa - Online Video Synchronizer - Microsoft Edge Addons in your Microsoft Edge
- Click
Get
button
Firefox (will be supported in a later version)
Self-hosting Guide
Notices:
Without Docker
1. Get binary executable file
-
If you want to alter the source code and build yourself, make sure you have
golang environment
in your server, then run the script below to get and build a binary file:go get github.com/LouisYLWang/Sync-Sofa/server # If you don't know $GOPATH # try "go env GOPATH" cd $GOPATH/src/github.com/LouisYLWang/Sync-Sofa/server # Next step is optional # If you have any error message like: # "dial tcp 216.58.200.49:443: i/o timeout" # then try export GOPROXY=https://goproxy.io go install cd $GOPATH/bin
-
If you want to only deploy the binary file:
- Open Github release page
- Download
server
binary file for linux server - Download
config.json
file to the same directory of binary file
2. In the directory of binary file, adjust config file base on your need:
-
Config file variables:
-
addr
: port of server -
runmode
:- dev: developing mode
- prod: producting mode
-
tlsdir
: TLS certificate paths-
tlskey
: TLS certificate privatekey path -
tlscert
: TLS certification path
-
Notices:
addr
,runmode
are mandatory,tlskey
,tlscert
are required for TLS connection -
-
minimal (non-https) config file:
{ "addr": ":80", "runmode": "dev" }
-
production environment (https) config file:
{ "addr": ":443", "runmode": "prod", "tlsdir": { "tlskey": "/etc/letsencrypt/live/your.host.url/privkey.pem", "tlscert": "/etc/letsencrypt/live/your.host.url/fullchain.pem" } }
3. Run ./server
to delopy the server, deployment is successful if you see:
found config file, read parameters from config file...
server is listening at {your_port_number}...
With Docker
Make sure docker service is runing on your server, make change to the script blow and run:
-
variables
-
ADDR
: port of server -
RUNMODE
:- dev: developing mode
- prod: producting mode
-
APIHOST
: your host name -
IMGNAME
: your docker image name, set arbitrarily -
TLSKEYPATH
: TLS certificate privatekey path -
TLSCERTPATH
: TLS certification path
-
-
minimal (non-https) hosting script:
docker pull louisylwang/watchtogether export ADDR=:4000 \ export RUNMODE=dev \ export IMGNAME=yourimagename \ docker run -d \ -e ADDR=:4000 \ -e RUNMODE=RUNMODE \ -p 4000:4000 \ --name IMGNAME louisylwang/watchtogether
-
production environment (https) hosting script:
docker pull louisylwang/watchtogether export ADDR=:443 \ export RUNMODE=prod \ export APIHOST=your.host.name \ export IMGNAME=yourimagename \ export TLSKEYPATH=/your/path/to/TLS/privatekey \ export TLSCERTPATH=/your/path/to/TLS/certification \ docker run -d \ -e ADDR=:ADDR \ #docker port to server:server port to docker, not necessarily the same -p ADDR:ADDR \ -e RUNMODE=RUNMODE \ #if you use letsencrypt, TLSKEY value should be /etc/letsencrypt/live/$APIHOST/privkey.pem -e TLSKEY=TLSKEYPATH \ #if you use letsencrypt, TLSCERT value should be /etc/letsencrypt/live/$APIHOST/fullchain.pem -e TLSCERT=TLSCERTPATH \ #need to expose your TLS certification file to docker -v /etc/letsencrypt:/etc/letsencrypt:ro \ --name IMGNAME louisylwang/watchtogether \ --restart=always
-
deployment is successful if you see in
docker logs {your docker image name}
:not found config file, read parameters from system variables... YYYY/MM/DD HH:MM:SS server is listening at :ADDR...
Release History
v1.0.10
🛠
update on 02 Feb 2021
Add:
- Video call support.
Fix:
- Fix bug about close connection, now you can reconnect immdediately without refreshing current page.(
Auto reconnect
will be coming soon~) - UI changed.
- Fix bug about video buffering.
v1.0.9
🛠
update on 14 Aug 2020
own controller
of the playback rate, so please ignore the wrong display of playback rate
.
Add:
- playback rate sync: any side user's change to the playback rate will sync to the other side.
Fix:
- Fix bug of no new bugs
v1.0.8
🛠
update on 8 Aug 2020
Room code
like 0000
or 1234
, We strongly recommend you use uncommon code so that you do not need to change it.
Add:
- allow customized connection code, user can directly connect to peer simply click the start button, without reapplying a new code
- simple built-in chat feature (can be toggled in options page)
- add system notification (can be toggled in options page)
- add connection status budge to extension icon (red-unconnected, yellow-pending connection, green-connecting)
- add a notification for unknown socket disconcerting
- add duplicate connection code notification
Fix:
- Fix bug of no new bugs
v1.0.7
🛠
update on 7 July 2020
Add: add version detection (lower version number will be detected from the user with higher version number if a room was established by lower version extension)
Fix: fix support for https://www.bilibili.com/bangumi/* (bilibili movie) fix support for Youku & mangoTV
v1.0.6
🛠
update on 28 June 2020
- Add:
- add support for Mango TV (happy Sistering
🤣 ) - add support for local video file syncing with VLC player #20
- add options page - debugging mode & self-hosting option #21
- add donating page
- add new wiki page #11
- add support for Mango TV (happy Sistering
- Fix:
- improve sync performance & stability:
- new sync logic, not compatible with any version before
- improve buffer detection
- improve sync performance & stability:
v1.0.5
🛠
update on 12 May 2020
Improve stability
Test for a new logic to avoid infinite echo back (each party repeats the last operation of another party) : introduce a queue as a buffer of operation and if the operations are beyond the frequency threshold, the client will automatically to halt and cool down for sometime.
Add support for edge browser (beta)
v1.0.4
🛠
update on 10 May 2020
Now the user will get a notification when they successfully connected to each other Improve stability, better sync performance Change the notification UI using sweetalert
v1.0.3
🛠
update on 8 May 2020
improve stability & UX logic Added support of following websites:
Fixed the support of duonao live; Removed the support of 91mjw (temporarily); Refined documentation, will add more detail in next verison;
v1.0.2
🛠
update on 31 Mar 2020
Add support of play process bar control sync Fixed the issue that when syncing playing time, there is the possibility to crash the extension
v0.0.1
🛠
update on 26 Mar 2020 (beta version)
Add support of 2 parties connection Add support of sync pause and play action Add support of out-of-sync notification
Meta
Yiliang "Louis" Wang – @blog – @mail
Contributing
- Fork it (https://github.com/LouisYLWang/Sync-Sofa/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
FAQ
-
Q: When I installed, Chrome popup says that Sync Sofa requires the permissions of
read and change your data on a number of websites
andread your browsing history
, sounds so horrible, is that safe? A: We do not collect your browsing data, the only thing we do is to get your current tab information and make sure you are visiting a site we support (support list). All information is collected and processed locally. We do not mess up the data on the websites you are watching, just inject a sync script to get your pause, play, and seek operation. All source code can be reviewed at our github page, we promise everything we did is necessary and not harmful. -
If your find your extension button is darken, please first make sure you are in a video playing page.
-
If you find your extension can not request room code, please first check the option page and click
RESET
button. If it still not work, please close your web browser, wait for a while and try again. Currently our server is hosting abroad, it may cause connecting issue. -
If you find your extension cannot connect to your peer, please check following:
- please make sure the version number of two clients are consistent. To check the version number, you need to open chrome extension page (if this link is not work, please type
chrome://extensions/
into the address bar and visit). You will find a extension with the title ofSync Sofa - Online Video Synchronizer 1.0.6
.1.0.6
is your current version number of Sync Sofa. - If 4.1 does not solve your problem, please try step 2 again.
- please make sure the version number of two clients are consistent. To check the version number, you need to open chrome extension page (if this link is not work, please type
How to get debug info
- Open
Debug mode
in Options page. - Refresh video page (to make changes work).
-
Shift + ctrl + i
in Windows orShift + cmd + i
in MacOS. - Choose
console
tab.
Can not open VLC web Interface
First, check if http://127.0.0.1:8080/
can be opened successfully, if the answer is not, go and check if 8080
is binded by some other process. If this process can be shuted down, turn it off and try again.
If not, please change the default port of the VLC web interface to 9891
. (Will come into operation from v1.0.10
)
Sync Sofa (在线视频同步播放插件)
以稳定,快捷的方式远程同步观看在线/本地视频
Sync Sofa是一个稳定易用的Chrome浏览器拓展插件,可同步两端用户的视频播放操作,提高与身处异地的小伙伴一同观看视频的体验,目前支持以下主要功能:
- 平等双人连接:任意一端均可控制对方播放状态
- 同步播放进度:支持播放、暂停、进度切换等操作
- 本地视频同步:可通过VLC同步本地视频播放状态
当前版本特性
v1.0.9 - 2020年8月14日更新
自己的倍速控件
,所以请忽略前端的错误播放速度
显示。
新增:
- 播放速率同步功能:任意端用户对播放速率的调整会自动同步至另一端
修复:
- 修复了没有bug的bug
v1.0.8 - 2020年8月8日更新
0000
和1234
这样简单的房间码
,我们强烈建议你使用不常见的房间码,这样就不必频繁更改它。
新增:
- 修改房间申请码逻辑,用户可自行输入房间码,且下次连接时无需重新申请,只需点击start按钮即可快速连接(!房间码须为四位小写字母+数字的组合)
- 增加内置文字聊天(可在配置页面切换)
- 增加系统通知选项(可在配置页面切换)
- 增加连接状态指示灯,显示在插件图标右下角(红-未连接,黄-等待对方连接,绿-正在连接)
- 增加socket断开因未知原因断开通知
- 增加房间码占用通知
修复:
- 修复了没有bug的bug
支持网站列表
设置
服务器列表
最近许多用户反映国内的访问不稳定,是因为我们的默认服务器在美国,因此我们提供了备用服务器列表,你可以根据你的位置切换到离你距离更近的服务器。
- 中国杭州【1】
https
sync-cn.onns.xyz
- 中国北京【2】【弃用】 (感谢 @huoranxuanyuan)
https
api.huoranxuanyuan.cn
- 中国北京【3】 (感谢 @liqimore)
https
sync-bj.204800.xyz
- 中国上海【4】 (感谢 @liqimore)
https
sync-shanghai.204800.xyz
- 美国【1】
https
app.ylwang.me
- 美国密苏里州【2】 (感谢 @liqimore)
https
sync-us-central.pq02.com
在设置服务器前,请检查服务器的状态:Sync Sofa (在线视频同步播放插件).
我们会感谢你对该开源项目作出的贡献,你可以通过提供自己部署的服务来支持我们,也可以帮我们分担一点服务器费用的压力。(也可以一键三连)
支付宝, 微信支付, 贝宝
选项页
打开选项页有下列两种方法:
- 右键点击
Sync Sofa
插件图标, 选择选项
。 - 左键点击
Sync Sofa
插件图标, 在插件弹窗中选择底部设置
图标。
设置界面如下:
刷新视频页面
修改设置并保存后,请刷新视频网站页面/本地视频页面/ http://127.0.0.1:8080/(如果你使用VLC播放本地视频)来使设置生效。
使用说明
注意事项
客户端版本号
一致。
服务器域名
一致。
.mp4
文件,请在扩展详细信息页面启用“允许访问文件url”。
方法1. 在地址栏输入chrome://extensions/
,找到Sync Sofa
,点击详情
按钮,启用允许访问文件网址
。
方法2.右击浏览器左上角Sync Sofa
图标,选择管理拓展程序
, 启用允许访问文件网址
。
多个不同版本
的Sync Sofa
,请只启用其中一个并禁用其他版本。
打开视频页面
你们可以同步观看不同来源的视频,在播放本地.mp4
视频文件时,你的小伙伴可以选择在视频网站上和你同步观看,此外,你们还可以在不同的视频网站看观看相同的视频。
例如,用户A
在Bilibili上观看此视频:
此时用户B
可在YouTube上同步观看同一视频:
PS:我是boki的粉丝,所以就用了她的视频截图,已经高斯模糊处理过了,如果有侵权的话,请联系我们删除,真的很抱歉!
如果视频开始前有广告,请在广告结束后进入下一步。
获取连接码
点击 Sync Sofa
插件图标并点击START
(开始) 按钮.
如一切正常,你会收到弹窗提示Room created and room code copied to clipboard
(房间已建立,连接码已复制到剪贴板),同时连接码
将自动拷贝到剪切板中,请将它发给你的小伙伴。
开始连接
你的小伙伴收到room code(连接码)
后,点击Sync Sofa
插件图标,粘贴到输入栏中点击START(开始)
按钮。
愉快观看吧
现在你可以播放视频了,你的播放,暂停,更改时间等操作都会同步给你的小伙伴。愉快地同步观看吧!
VLC支持
如果你们都通过VLC 媒体播放器
播放视频,Sync Sofa
也可以同步你们的操作。
通过Web控制界面操控VLC播放
首先你们需要开启VLC的Web控制界面,使浏览器可以控制VLC的播放,请参考以下官方文档:
- 打开VLC媒体播放器
- 进入
工具 → 偏好设置 (左下角显示设置选择 "全部") → 界面 → 主界面
, 勾选 "Web" - 进入
工具 → 偏好设置 (左下角显示设置选择 "全部") → 界面 → 主界面 → Lua
, 设置Lua HTTP - 密码
- 点击
保存
并重启VLC媒体播放器 - 在浏览器中打开 http://127.0.0.1:8080/
这时你的网页应该如下图所示:
打开本地视频
本插件本质上是通过控制VLC的网页控制页面
(http://127.0.0.1:8080/)来控制VLC
的,所以下一步你应该用VLC媒体播放器
来打开你想同步的视频,然后检查一下http://127.0.0.1:8080/能否顺利控制视频的播放等。如果可以,即可进入下一步;否则需要检查一下是不是打开了多个VLC的窗口
,如果是请关掉其它的,然后重新尝试控制。一个正常的VLC控制界面
应该如下图所示:
在网页上有视频标题,当前播放时间和总播放时长等。
获取连接码
确认已在浏览器中打开 http://127.0.0.1:8080/, 点击 Sync Sofa
插件图标并点击REQUEST NEW CODE
(获取链接码) 按钮.
如一切正常,你会收到弹窗提示Room created and room code copied to clipboard
(房间已建立,连接码已复制到剪贴板,同时连接码
将自动拷贝到剪切板中,请将它发给你的小伙伴。
开始连接
你的小伙伴收到room code
后,点击Sync Sofa
插件图标,粘贴到输入栏中点击START
(开始)按钮。
愉快观看吧
现在你可以使用Sync Sofa
通过VLC同步本地视频播放状态了,你的播放,暂停,更改时间等操作都会同步给你的小伙伴。愉快地同步观看吧!
注意:
关闭控制页面
视频播放完毕后,点击Sync Sofa
插件页面上的STOP
按钮,或关闭http://127.0.0.1:8080/页面。
安装
谷歌浏览器
从谷歌商店安装
- 在Chrome浏览器中打开 Sync Sofa - Online Video Synchronizer - Chrome Web Store
- 点击
Add to Chrome
按钮 - 选择
Add extension
从本地 .crx 文件安装
- 打开 Github release page(版本发布页面)
- 下载
sync_sofa.[version].crx
, [version] 为当前最新版本编号 - 在Chrome浏览器地址栏中输入
chrome://extensions/
- 启用
开发者模式
(页面右上角) - 将
sync_sofa.[版本号].crx
拖入chrome://extensions/
页面 - 点击
添加插件
按钮
注意: 如果该插件被Chrome浏览器禁用,请尝试 从谷歌商店安装 或者 安装未打包的插件
This extension is not listed in the Chrome Web Store and may have been added without your knowledge.
安装未打包的插件
- 下载 稳定版本 or 开发版本 (新特性,也许也有bug)
- 解压你下载的
.zip
压缩文件 - 在Chrome地址栏输入
chrome://extensions/
打开插件管理页面 - 开启右上角
开发者模式
按钮 - 点击左上角
加载未打包的拓展
按钮 - 选择
下载路径/解压路径/client/chrome_extension
- 点击
选择
微软Edge浏览器:
从Edge浏览器插件中心安装
- 在Edge浏览器中打开 Sync Sofa - Online Video Synchronizer - Microsoft Edge Addons
- 点击
获取
按钮
Firefox(后续版本添加支持)
其实也可能不会
服务端部署指南
注意:
直接部署(不使用Docker容器):
1. 获取执行文件
-
如果你想要修改源代码并自行编译,请执行以下shell脚本获取二进制文件。在执行前,请确认服务器已安装
Go
的环境go get github.com/LouisYLWang/Sync-Sofa/server # 如果你不清楚 $GOPATH # 请尝试输入并执行 "go env GOPATH" cd $GOPATH/src/github.com/LouisYLWang/Sync-Sofa/server # (下一步可省略) # 如果你看到了这条消息: # "dial tcp 216.58.200.49:443: i/o timeout" # 请添加并执行下一条命令 export GOPROXY=https://goproxy.io go install cd $GOPATH/bin
-
如果无需修改源代码并自行编译,你也可以直接下载二进制文件:
- 打开 Github release page
- 下载
server
文件(适用于linux服务器) - 下载
config.json
文件,移动至server
同一路径
2. 修改配置文件:
-
配置变量:
-
addr
: 服务器端口 -
runmode
:- dev: 开发模式(建议本地使用,不包含对HTTPS的支持)
- prod: 生产模式
-
tlsdir
:-
tlskey
: TLS证书私钥路径 -
tlscert
: TLS证书路径
-
Notices:
addr
,runmode
为必须参数,tlskey
,tlscert
参数在使用HTTPS连接时(生产环境下)为必须参数 -
-
开发模式(http)配置文件样例:
{ "addr": ":80", "runmode": "dev" }
-
生产模式(https)配置文件样例:
{ "addr": ":443", "runmode": "prod", "tlsdir": { "tlskey": "/etc/letsencrypt/live/your.host.url/privkey.pem", "tlscert": "/etc/letsencrypt/live/your.host.url/fullchain.pem" } }
3. 在执行文件所在路径下,执行 ./server
部署服务器, 部署成功信息如下:
found config file, read parameters from config file...
server is listening at {your_port_number}...
使用Docker容器部署
在部署前请确认Docker容器在服务器端可正常运行,请按照如下提示修改参数
-
配置变量:
-
ADDR
: 服务器端口 -
RUNMODE
:- dev: 开发模式(建议本地使用,不包含对HTTPS的支持)
- prod: 生产模式
-
APIHOST
: 服务器网址 -
IMGNAME
: docker容器名称(可自选) -
TLSKEYPATH
: TLS证书私钥路径 -
TLSCERTPATH
: TLS证书路径
-
-
开发模式(http)配置文件样例:
docker pull louisylwang/watchtogether export ADDR=:4000 \ export RUNMODE=dev \ export IMGNAME=yourimagename \ docker run -d \ -e ADDR=:4000 \ -e RUNMODE=RUNMODE \ -p 4000:4000 \ --name IMGNAME louisylwang/watchtogether
-
生产模式(https)配置文件样例:
docker pull louisylwang/watchtogether export ADDR=:443 \ export RUNMODE=prod \ export APIHOST=your.host.name \ export IMGNAME=yourimagename \ export TLSKEYPATH=/your/path/to/TLS/privatekey \ export TLSCERTPATH=/your/path/to/TLS/certification \ docker run -d \ -e ADDR=:ADDR \ #docker port to server:server port to docker, not necessarily the same -p ADDR:ADDR \ -e RUNMODE=RUNMODE \ #if you use letsencrypt, TLSKEY value should be /etc/letsencrypt/live/$APIHOST/privkey.pem -e TLSKEY=TLSKEYPATH \ #if you use letsencrypt, TLSCERT value should be /etc/letsencrypt/live/$APIHOST/fullchain.pem -e TLSCERT=TLSCERTPATH \ #need to expose your TLS certification file to docker -v /etc/letsencrypt:/etc/letsencrypt:ro \ --name IMGNAME louisylwang/watchtogether \ --restart=always
-
部署成功后,执行
docker logs {your docker image name}
将会提示下列日志信息:not found config file, read parameters from system variables... YYYY/MM/DD HH:MM:SS server is listening at :ADDR...
版本日志
v1.0.9
🛠
2020年8月14日更新
自己的倍速控件
,所以请忽略前端的错误播放速度
显示。
新增:
- 播放速率同步功能:任意端用户对播放速率的调整会自动同步至另一端
修复:
- 修复了没有bug的bug
v1.0.8
🛠
2020年8月8日更新
0000
和1234
这样简单的房间码
,我们强烈建议你使用不常见的房间码,这样就不必频繁更改它。
新增:
- 修改房间申请码逻辑,用户可自行输入房间码,且下次连接时无需重新申请,只需点击start按钮即可快速连接(!房间码须为四位小写字母+数字的组合)
- 增加内置文字聊天(可在配置页面切换)
- 增加系统通知选项(可在配置页面切换)
- 增加连接状态指示灯,显示在插件图标右下角(红-未连接,黄-等待对方连接,绿-正在连接)
- 增加socket断开因未知原因断开通知
- 增加房间码占用通知
修复:
- 修复了没有bug的bug
v1.0.7
🛠
2020年7月5日更新
- 新增功能:
- 新增版本检测(高版本用户与低版本用户连接时,若连接码由低版本用户申请,高版本用户将收到提示,请根据提示告知对方升级最新版本)
- 修复功能:
- 修复对 bilibili movie 的支持
- 修复了优酷及芒果TV无法同步操作的问题
v1.0.6
🛠
2020年6月28日更新
- 新增功能:
- 支持芒果TV(来乘风破浪吧!
🤣 ) - 支持使用VLC播放器同步播放本地视频文件
- 新增设置页面-调试模式
- 新增捐赠页面
- 新增wiki页面
- 支持芒果TV(来乘风破浪吧!
- 修复功能:
- 提高同步的稳定性:
- 更新了同步逻辑(不与之前的任何版本兼容,请尽快更新至1.0.6+)
- 增加缓冲检测
- 提高同步的稳定性:
v1.0.5
🛠
2020年5月12日更新
- 新增功能:
- 增加对Edge浏览器的支持
- 修复功能:
- 提高同步的稳定性
v1.0.4
🛠
2020年5月10日更新
- 新增功能:
- 新增成功连接提示
- 修复功能:
- 提高同步的稳定性
- 修改消息弹窗样式
v1.0.3
🛠
2020年5月8日更新
v1.0.2
🛠
2020年3月31日更新
- 新增功能:
- 支持对修改播放进度的同步
- 修复功能:
- 提高同步的稳定性
v0.0.1
🛠
2020年3月26日更新 (测试版)
- 新增功能:
- 支持播放暂停同步
- 支持断开连接提示
开发者
Yiliang "Louis" Wang – @blog – @mail
参与更新
- 拷贝当前代码(https://github.com/LouisYLWang/Sync-Sofa/fork)
- 创建你自己的分支 (
git checkout -b feature/fooBar
) - 添加评论 (
git commit -am 'Add some fooBar'
) - 提交代码 (
git push origin feature/fooBar
) - 创建一个更新请求
常见问题
-
Q: 在我安装的时候,Chrome提示我Sync Sofa可以
读取和更改您在一些网站上的数据
以及读取您的浏览记录
,听起来很严重,它安全吗?A: 我们不会收集你的浏览数据,我们只会读取你当前标签页的标题,用来判断你是否在访问我们支持的页面(支持网站列表),以避免影响使用体验的事情发生。所有对你浏览数据的收集和处理只会发生在本地;事实上我们也不会随意修改网站的数据,我们只会使用一个同步脚本来监测你播放,暂停及更新进度等操作(我们不得不这样做)。所有的源码都可以在 [我们的项目主页]审核(https://github.com/LouisYLWang/Sync-Sofa), 我们承诺目前做的所有事情都是必要且无害的.
-
如果你发现按钮变灰, 请确认你是否在我们支持的网站操作(支持网站列表).
-
如果你发现插件无法获取同步码,请按以下顺序检查问题:
- 请检查 选项页面 并点击
重置
按钮 - 请参考 选项页面 根据你所在的位置选择并设置合适的服务器
- 请检查服务器当前状态 https://sync-status.onns.xyz/是否正常启动
- 如以上都不能解决你的问题,请通过项目反馈页面或项目wiki页面右下角的反馈按钮通知我们。
- 请检查 选项页面 并点击
-
如果你发现插件无法正常同步操作,请按以下顺序检查问题:
- 请务必确认两方版本号是否一致,欲检测版本号,需打开chrome extension page,并找到
Sync Sofa - Online Video Synchronizer *.*.*
,其中*.*.*
为当前版本。 - 请检查 选项页面 并点击
重置
按钮 - 请参考 选项页面 根据你所在的位置选择并设置合适的服务器
- 请检查服务器当前状态 https://sync-status.onns.xyz/是否正常启动.
- 如以上都不能解决你的问题,请通过项目反馈页面或项目wiki页面右下角的反馈按钮通知我们。
- 请务必确认两方版本号是否一致,欲检测版本号,需打开chrome extension page,并找到
如何获取调试信息
- 在选项页里打开
debug模式
。 - 刷新视频页面。
-
Shift + ctrl + i
在 Windows 下 或者Shift + cmd + i
在 MacOS 下. - 选择
console
标签页.
VLC同步功能无法正常使用
首先确认http://127.0.0.1:8080/
能否正常打开,如果不能,请查看一下8080
端口是否被其它应用程序占用。如果该程序可以被关闭,请关闭后再次尝试开启。
如果不能,请参考相关配置将VLC
的端口号设置为9891
。(将在v1.0.10
之后生效)
如果可以打开http://127.0.0.1:8080/
,但页面无法正常渲染,请尝试开启科学上网
后再次刷新页面。(页面需要加载google的一个js文件)