├── .eslintrc.json
├── .github
└── workflows
│ ├── build.yml
│ └── create-release-from-changelog.yml
├── .gitignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── doc
├── activity.png
├── settings.png
└── start-synchronizing.png
├── entitlements.plist
├── forge.config.js
├── package-lock.json
├── package.json
├── src
├── activity-client.ts
├── activity-window.ts
├── assets
│ ├── Logo_white_text.svg
│ ├── activity.html
│ ├── api-video-logo.icns
│ ├── api-video-logo.ico
│ ├── green-dot.png
│ ├── orange-dot.png
│ ├── settings.html
│ ├── styles.css
│ └── tray-icon.png
├── index.ts
├── settings-client.ts
├── settings-window.ts
├── synchronizer.ts
└── tools.ts
├── tsconfig.json
└── yarn.lock
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "es6": true,
5 | "node": true
6 | },
7 | "extends": [
8 | "eslint:recommended",
9 | "plugin:@typescript-eslint/eslint-recommended",
10 | "plugin:@typescript-eslint/recommended",
11 | "plugin:import/recommended",
12 | "plugin:import/electron",
13 | "plugin:import/typescript"
14 | ],
15 | "parser": "@typescript-eslint/parser"
16 | }
17 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 | on:
3 | release:
4 | types: [published]
5 | jobs:
6 | build-macos:
7 | runs-on: macos-latest
8 | steps:
9 | - name: Check out Git repository
10 | uses: actions/checkout@v1
11 |
12 | - name: Add Apple developer ID certificate
13 | env:
14 | MACOS_CERTIFICATE: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE }}
15 | MACOS_CERTIFICATE_PWD: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD }}
16 | run: |
17 | echo $MACOS_CERTIFICATE > certificate.base64
18 | base64 -i certificate.base64 --decode > certificate.p12
19 | security create-keychain -p TMP_KEYCHAIN_PASS build.keychain
20 | security default-keychain -s build.keychain
21 | security unlock-keychain -p TMP_KEYCHAIN_PASS build.keychain
22 | security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
23 | security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k TMP_KEYCHAIN_PASS build.keychain
24 | - name: Install Node.js, NPM and Yarn
25 | uses: actions/setup-node@v1
26 | with:
27 | node-version: 14
28 |
29 | - name: Build/release Electron app
30 | run: npm install && npm run make && cp out/make/zip/darwin/x64/api-video-darwin-x64-*.zip out/make/api-video.zip
31 | env:
32 | APPLE_ID: ${{ secrets.APPLE_ID }}
33 | APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
34 |
35 | - uses: actions/upload-artifact@v2
36 | with:
37 | name: api-video.dmg
38 | path: out/make/api-video.dmg
39 |
40 | - uses: actions/upload-artifact@v2
41 | with:
42 | name: api-video.zip
43 | path: out/make/api-video.zip
44 | build-windows:
45 | runs-on: windows-latest
46 | steps:
47 | - name: Check out Git repository
48 | uses: actions/checkout@v1
49 |
50 | - name: Install Node.js, NPM and Yarn
51 | uses: actions/setup-node@v1
52 | with:
53 | node-version: 14
54 |
55 | - name: Build/release Electron app
56 | run: npm install && npm run make
57 |
58 | - uses: actions/upload-artifact@v2
59 | with:
60 | name: api-video-win32-x64-setup.exe
61 | path: out/make/squirrel.windows/x64/api-video-win32-x64-setup.exe
62 | release:
63 | name: Upload Release Asset
64 | needs: [build-macos, build-windows]
65 | runs-on: ubuntu-latest
66 | steps:
67 | - uses: actions/download-artifact@v2
68 | with:
69 | name: api-video.dmg
70 | - uses: actions/download-artifact@v2
71 | with:
72 | name: api-video.zip
73 | - uses: actions/download-artifact@v2
74 | with:
75 | name: api-video-win32-x64-setup.exe
76 | - name: ls
77 | run: ls
78 | - name: Upload macos zip to release
79 | uses: svenstaro/upload-release-action@v2
80 | with:
81 | repo_token: ${{ secrets.GITHUB_TOKEN }}
82 | file: ./api-video.zip
83 | asset_name: api-video-${{ github.ref_name }}-darwin-x64.zip
84 | tag: ${{ github.ref }}
85 | overwrite: true
86 | - name: Upload macos binaries to release
87 | uses: svenstaro/upload-release-action@v2
88 | with:
89 | repo_token: ${{ secrets.GITHUB_TOKEN }}
90 | file: ./api-video.dmg
91 | asset_name: api-video-${{ github.ref_name }}-darwin-x64.dmg
92 | tag: ${{ github.ref }}
93 | overwrite: true
94 | - name: Upload windows binaries to release
95 | uses: svenstaro/upload-release-action@v2
96 | with:
97 | repo_token: ${{ secrets.GITHUB_TOKEN }}
98 | file: ./api-video-win32-x64-setup.exe
99 | asset_name: api-video-${{ github.ref_name }}-win32-x64-setup.exe
100 | tag: ${{ github.ref }}
101 | overwrite: true
--------------------------------------------------------------------------------
/.github/workflows/create-release-from-changelog.yml:
--------------------------------------------------------------------------------
1 | name: Create draft release from CHANGELOG.md
2 |
3 | on:
4 | push:
5 | paths:
6 | - 'CHANGELOG.md'
7 |
8 | jobs:
9 | update-documentation:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v2
13 | - name: Create draft release if needed
14 | uses: apivideo/api.video-release-from-changelog-action@main
15 | with:
16 | github-auth-token: ${{ secrets.GITHUB_TOKEN }}
17 | prefix: v
18 |
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 | .DS_Store
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 | *.lcov
25 |
26 | # nyc test coverage
27 | .nyc_output
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # TypeScript v1 declaration files
40 | typings/
41 |
42 | # TypeScript cache
43 | *.tsbuildinfo
44 |
45 | # Optional npm cache directory
46 | .npm
47 |
48 | # Optional eslint cache
49 | .eslintcache
50 |
51 | # Optional REPL history
52 | .node_repl_history
53 |
54 | # Output of 'npm pack'
55 | *.tgz
56 |
57 | # Yarn Integrity file
58 | .yarn-integrity
59 |
60 | # dotenv environment variables file
61 | .env
62 | .env.test
63 |
64 | # parcel-bundler cache (https://parceljs.org/)
65 | .cache
66 |
67 | # next.js build output
68 | .next
69 |
70 | # nuxt.js build output
71 | .nuxt
72 |
73 | # vuepress build output
74 | .vuepress/dist
75 |
76 | # Serverless directories
77 | .serverless/
78 |
79 | # FuseBox cache
80 | .fusebox/
81 |
82 | # DynamoDB Local files
83 | .dynamodb/
84 |
85 | # Webpack
86 | .webpack/
87 |
88 | # Electron-Forge
89 | out/
90 | dist
91 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 | All changes to this project will be documented in this file.
3 |
4 | ## [0.1.2] - 2021-12-20
5 | - Add auto-update feature
6 | - Build MacOS zip bundle
7 |
8 | ## [0.1.1] - 2021-12-20
9 | - Fix tray icon size
10 | - Change executable file name
11 |
12 | ## [0.1.0] - 2021-12-20
13 | - Add "video uploaded" notification
14 |
15 | ## [0.0.2] - 2021-12-10
16 | - Rename "DONE" label to "VIEW"
17 | - Restart downloads that have failed
18 | - Improve activity window design
19 |
20 | ## [0.0.1] - 2021-12-09
21 | - First alpha version
22 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to api.video
2 |
3 | :movie_camera::+1::tada: Thank you for taking the time to contribute and participate in the implementation of a Video First World! :tada::+1::movie_camera:
4 |
5 | The following is a set of guidelines for contributing to api.video and its packages, which are hosted in the [api.video Organization](https://github.com/apivideo) on GitHub.
6 |
7 | #### Table of contents
8 |
9 | - [Contributing to api.video](#contributing-to-apivideo)
10 | - [Table of contents](#table-of-contents)
11 | - [Code of conduct](#code-of-conduct)
12 | - [I just have a question!](#i-just-have-a-question)
13 | - [How can I contribute?](#how-can-i-contribute)
14 | - [Reporting bugs](#reporting-bugs)
15 | - [Before submitting a bug report](#before-submitting-a-bug-report)
16 | - [How do I submit a (good) bug report?](#how-do-i-submit-a-good-bug-report)
17 | - [Suggesting enhancements](#suggesting-enhancements)
18 | - [How do I submit a (good) enhancement suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
19 | - [Pull requests](#pull-requests)
20 | - [Style guides](#style-guides)
21 | - [Git commit messages](#git-commit-messages)
22 | - [Documentation style guide](#documentation-style-guide)
23 | - [Additional notes](#additional-notes)
24 | - [Issue and pull request labels](#issue-and-pull-request-labels)
25 | - [Type of issue and issue state](#type-of-issue-and-issue-state)
26 | - [Topic categories](#topic-categories)
27 | - [Pull request labels](#pull-request-labels)
28 |
29 | ## Code of conduct
30 |
31 | This project and everyone participating in it is governed by the [api.video Code of Conduct](https://github.com/apivideo/.github/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [help@api.video](mailto:help@api.video).
32 |
33 | ## I just have a question!
34 |
35 | > **Note:** [Please don't file an issue to ask a question.] You'll get faster results by using the resources below.
36 |
37 | We have an official message board with a detailed FAQ and where the community chimes in with helpful advice if you have questions.
38 |
39 | * [The official api.video's Community](https://community.api.video/)
40 | * [api.video FAQ](https://community.api.video/c/faq/)
41 |
42 |
43 | ## How can I contribute?
44 |
45 | ### Reporting bugs
46 |
47 | This section guides you through submitting a bug report for api.video. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer:, and find related reports :mag_right:.
48 |
49 | Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/apivideo/.github/blob/main/.github/ISSUE_TEMPLATE/bug_report.yml), the information it asks for helps us resolve issues faster.
50 |
51 | > **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
52 |
53 | #### Before submitting a bug report
54 |
55 | * **Check the [The official api.video's Community](https://community.api.video/)** for a list of common questions and problems.
56 | * **Determine which repository the problem should be reported in**.
57 | * **Perform a [cursory search](https://github.com/search?q=is%3Aissue+user%3Aapivideo)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.
58 |
59 | #### How do I submit a (good) bug report?
60 |
61 | Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined which repository your bug is related to, create an issue on that repository and provide the following information by filling in [the template](https://github.com/apivideo/.github/blob/main/.github/ISSUE_TEMPLATE/bug_report.yml).
62 |
63 | Explain the problem and include additional details to help maintainers reproduce the problem:
64 |
65 | * **Use a clear and descriptive title** for the issue to identify the problem.
66 | * **Describe the exact steps which reproduce the problem** in as many details as possible. When listing steps, **don't just say what you did, but explain how you did it**.
67 | * **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
68 | * **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
69 | * **Explain which behavior you expected to see instead and why.**
70 | * **Include screenshots or videos** which show you following the described steps and clearly demonstrate the problem.
71 | * **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
72 |
73 | Provide more context by answering these questions:
74 |
75 | * **Did the problem start happening recently** (e.g. after updating to a new version of api.video) or was this always a problem?
76 | * If the problem started happening recently.**
77 | * **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
78 |
79 | Include details about your configuration and environment:
80 |
81 | * **Which version of the api.video package are you using?**
82 | * **What's the name and version of the OS you're using?**
83 |
84 | ### Suggesting enhancements
85 |
86 | This section guides you through submitting an enhancement suggestion for api.video project, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
87 |
88 | When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](https://github.com/apivideo/.github/blob/main/.github/ISSUE_TEMPLATE/feature_request.yml), including the steps that you imagine you would take if the feature you're requesting existed.
89 |
90 |
91 | #### How do I submit a (good) enhancement suggestion?
92 |
93 | Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:
94 |
95 | * **Use a clear and descriptive title** for the issue to identify the suggestion.
96 | * **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
97 | * **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
98 | * **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
99 | * **Include screenshots** which help you demonstrate the steps or point out the part of api.video which the suggestion is related to.
100 | * **Explain why this enhancement would be useful** to most api.video users and isn't something that can or should be implemented as a community package.
101 | * **Specify which version of the api.video package you're using.**
102 | * **Specify the name and version of the OS you're using.**
103 |
104 |
105 | ### Pull requests
106 |
107 | The process described here has several goals:
108 |
109 | - Maintain api.video's quality
110 | - Fix problems that are important to users
111 | - Engage the community in working toward the best possible api.video
112 | - Enable a sustainable system for api.video's maintainers to review contributions
113 |
114 | Please follow these steps to have your contribution considered by the maintainers:
115 |
116 | 1. Explain what, why and how you resolved the issue. If you have a related issue, please mention it.
117 | 2. Follow the [style guides](#style-guides)
118 | 3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing What if the status checks are failing?If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.
119 |
120 | While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
121 |
122 | ## Style guides
123 |
124 | ### Git commit messages
125 |
126 | * Use the present tense ("Add feature" not "Added feature")
127 | * Limit the first line to 72 characters or less
128 | * Reference issues and pull requests after the first line
129 | * Consider starting the commit message with an applicable emoji:
130 | * :art: `:art:` when improving the format/structure of the code
131 | * :racehorse: `:racehorse:` when improving performance
132 | * :non-potable_water: `:non-potable_water:` when plugging memory leaks
133 | * :memo: `:memo:` when writing docs
134 | * :penguin: `:penguin:` when fixing something on Linux
135 | * :apple: `:apple:` when fixing something on macOS
136 | * :checkered_flag: `:checkered_flag:` when fixing something on Windows
137 | * :bug: `:bug:` when fixing a bug
138 | * :fire: `:fire:` when removing code or files
139 | * :green_heart: `:green_heart:` when fixing the CI build
140 | * :white_check_mark: `:white_check_mark:` when adding tests
141 | * :lock: `:lock:` when dealing with security
142 | * :arrow_up: `:arrow_up:` when upgrading dependencies
143 | * :arrow_down: `:arrow_down:` when downgrading dependencies
144 | * :shirt: `:shirt:` when removing linter warnings
145 |
146 | ### Documentation style guide
147 |
148 | * Use [Markdown](https://daringfireball.net/projects/markdown).
149 |
150 |
151 | ## Additional notes
152 |
153 | ### Issue and pull request labels
154 |
155 | This section lists the labels we use to help us track and manage issues and pull requests on all api.video repositories.
156 |
157 | [GitHub search](https://help.github.com/articles/searching-issues/) makes it easy to use labels for finding groups of issues or pull requests you're interested in. We encourage you to read about [other search filters](https://help.github.com/articles/searching-issues/) which will help you write more focused queries.
158 |
159 |
160 | #### Type of issue and issue state
161 |
162 | | Label name | `apivideo` :mag_right: | Description |
163 | | --- | --- | --- |
164 | | `enhancement` | [search][search-apivideo-org-label-enhancement] | Feature requests. |
165 | | `bug` | [search][search-apivideo-org-label-bug] | Confirmed bugs or reports that are very likely to be bugs. |
166 | | `question` | [search][search-apivideo-org-label-question] | Questions more than bug reports or feature requests (e.g. how do I do X). |
167 | | `feedback` | [search][search-apivideo-org-label-feedback] | General feedback more than bug reports or feature requests. |
168 | | `help-wanted` | [search][search-apivideo-org-label-help-wanted] | The api.video team would appreciate help from the community in resolving these issues. |
169 | | `more-information-needed` | [search][search-apivideo-org-label-more-information-needed] | More information needs to be collected about these problems or feature requests (e.g. steps to reproduce). |
170 | | `needs-reproduction` | [search][search-apivideo-org-label-needs-reproduction] | Likely bugs, but haven't been reliably reproduced. |
171 | | `blocked` | [search][search-apivideo-org-label-blocked] | Issues blocked on other issues. |
172 | | `duplicate` | [search][search-apivideo-org-label-duplicate] | Issues which are duplicates of other issues, i.e. they have been reported before. |
173 | | `wontfix` | [search][search-apivideo-org-label-wontfix] | The api.video team has decided not to fix these issues for now, either because they're working as intended or for some other reason. |
174 | | `invalid` | [search][search-apivideo-org-label-invalid] | Issues which aren't valid (e.g. user errors). |
175 | | `package-idea` | [search][search-apivideo-org-label-package-idea] | Feature request which might be good candidates for new packages, instead of extending api.video packages. |
176 | | `wrong-repo` | [search][search-apivideo-org-label-wrong-repo] | Issues reported on the wrong repository. |
177 |
178 | #### Topic categories
179 |
180 | | Label name | `apivideo` :mag_right: | Description |
181 | | --- | --- | --- |
182 | | `windows` | [search][search-apivideo-org-label-windows] | Related to api.video running on Windows. |
183 | | `linux` | [search][search-apivideo-org-label-linux] | Related to api.video running on Linux. |
184 | | `mac` | [search][search-apivideo-org-label-mac] | Related to api.video running on macOS. |
185 | | `documentation` | [search][search-apivideo-org-label-documentation] | Related to any type of documentation. |
186 | | `performance` | [search][search-apivideo-org-label-performance] | Related to performance. |
187 | | `security` | [search][search-apivideo-org-label-security] | Related to security. |
188 | | `ui` | [search][search-apivideo-org-label-ui] | Related to visual design. |
189 | | `api` | [search][search-apivideo-org-label-api] | Related to api.video's public APIs. |
190 |
191 | #### Pull request labels
192 |
193 | | Label name | `apivideo` :mag_right: | Description
194 | | --- | --- | --- |
195 | | `work-in-progress` | [search][search-apivideo-org-label-work-in-progress] | Pull requests which are still being worked on, more changes will follow. |
196 | | `needs-review` | [search][search-apivideo-org-label-needs-review] | Pull requests which need code review, and approval from maintainers or api.video team. |
197 | | `under-review` | [search][search-apivideo-org-label-under-review] | Pull requests being reviewed by maintainers or api.video team. |
198 | | `requires-changes` | [search][search-apivideo-org-label-requires-changes] | Pull requests which need to be updated based on review comments and then reviewed again. |
199 | | `needs-testing` | [search][search-apivideo-org-label-needs-testing] | Pull requests which need manual testing. |
200 |
201 | [search-apivideo-org-label-enhancement]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aenhancement
202 | [search-apivideo-org-label-bug]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Abug
203 | [search-apivideo-org-label-question]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aquestion
204 | [search-apivideo-org-label-feedback]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Afeedback
205 | [search-apivideo-org-label-help-wanted]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Ahelp-wanted
206 | [search-apivideo-org-label-more-information-needed]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Amore-information-needed
207 | [search-apivideo-org-label-needs-reproduction]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aneeds-reproduction
208 | [search-apivideo-org-label-windows]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Awindows
209 | [search-apivideo-org-label-linux]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Alinux
210 | [search-apivideo-org-label-mac]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Amac
211 | [search-apivideo-org-label-documentation]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Adocumentation
212 | [search-apivideo-org-label-performance]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aperformance
213 | [search-apivideo-org-label-security]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Asecurity
214 | [search-apivideo-org-label-ui]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aui
215 | [search-apivideo-org-label-api]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aapi
216 | [search-apivideo-org-label-blocked]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Ablocked
217 | [search-apivideo-org-label-duplicate]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Aduplicate
218 | [search-apivideo-org-label-wontfix]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Awontfix
219 | [search-apivideo-org-label-invalid]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Ainvalid
220 | [search-apivideo-org-label-package-idea]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Apackage-idea
221 | [search-apivideo-org-label-wrong-repo]: https://github.com/search?q=is%3Aopen+is%3Aissue+user%3Aapivideo+label%3Awrong-repo
222 | [search-apivideo-org-label-work-in-progress]: https://github.com/search?q=is%3Aopen+is%3Apr+repo%3Aapivideo%2Fapivideo+label%3Awork-in-progress
223 | [search-apivideo-org-label-needs-review]: https://github.com/search?q=is%3Aopen+is%3Apr+repo%3Aapivideo%2Fapivideo+label%3Aneeds-review
224 | [search-apivideo-org-label-under-review]: https://github.com/search?q=is%3Aopen+is%3Apr+repo%3Aapivideo%2Fapivideo+label%3Aunder-review
225 | [search-apivideo-org-label-requires-changes]: https://github.com/search?q=is%3Aopen+is%3Apr+repo%3Aapivideo%2Fapivideo+label%3Arequires-changes
226 | [search-apivideo-org-label-needs-testing]: https://github.com/search?q=is%3Aopen+is%3Apr+repo%3Aapivideo%2Fapivideo+label%3Aneeds-testing
227 |
228 | [help-wanted]:https://github.com/search?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted+user%3Aapivideo+sort%3Acomments-desc
229 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 api.video
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://twitter.com/intent/follow?screen_name=api_video) [](https://github.com/apivideo/api.video-desktop-synchronizer) [](https://community.api.video)
2 | 
3 |
api.video video synchronization desktop application
4 |
5 | [api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
6 |
7 | # Table of contents
8 | - [Table of contents](#table-of-contents)
9 | - [Warning](#warning)
10 | - [Project description](#project-description)
11 | - [Getting started](#getting-started)
12 | - [Requirements](#requirements)
13 | - [Installation & first run](#installation--first-run)
14 | - [Documentation](#documentation)
15 | - [What is meant by "synchronization"](#what-is-meant-by-synchronization)
16 |
17 | # Warning
18 |
19 | **This project is still in the testing phase. The applications proposed for download should be considered as alpha version.**
20 |
21 | # Project description
22 |
23 | This desktop application allows you to easily upload all the videos files stored in a given folder of your computer to api.video.
24 |
25 | # Getting started
26 |
27 |
28 | ## Requirements
29 |
30 | At the moment, the application is compatible with MacOS & Windows.
31 |
32 | ## Installation & first run
33 |
34 | 1) download the executable that matches your OS (currently MacOS & Windows are supported) here: [latest release](https://github.com/apivideo/api.video-desktop-synchronizer/releases/latest).
35 | 2) launch the executable (NOTE: at the moment, Windows executables are not signed, so you will probably have to accept some security warnings at the first run)
36 | 3) when you launch the app for the first time, the Settings window appears. Here, you'll have to enter your [api.video API key](https://dashboard.api.video/register), and the folder you want to watch:
37 |
38 | 
39 |
40 | 4) once done, click on `Apply`. You can now lauch the synchronization by clicking on the api.video icon in your tray icons (next to the clock), and then on `Start synchronizing`:
41 |
42 | 
43 |
44 | 5) To see what files have been or are beeing uploaded, click on `Activity`. You'll see the upload progress of all your uploads:
45 |
46 | 
47 |
48 | # Documentation
49 |
50 | ## What is meant by "synchronization"
51 |
52 | Synchronization is a one-way process: the videos you add to the synchronized directory are sent to your api.video account. On the other hand:
53 | - if you delete a file from your synchronized folder, it won't be deleted from your api.video account,
54 | - if you add a file in your api.video account by another way, it won't be downloaded in your synchronized folder
55 |
56 |
--------------------------------------------------------------------------------
/doc/activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/doc/activity.png
--------------------------------------------------------------------------------
/doc/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/doc/settings.png
--------------------------------------------------------------------------------
/doc/start-synchronizing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/doc/start-synchronizing.png
--------------------------------------------------------------------------------
/entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.cs.allow-jit
6 |
7 | com.apple.security.cs.debugger
8 |
9 |
10 |
--------------------------------------------------------------------------------
/forge.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const fs = require('fs');
3 | const packageJson = require('./package.json');
4 |
5 | const { version } = packageJson;
6 | const iconDir = path.resolve(__dirname, 'assets', 'icons');
7 |
8 | if (process.env['WINDOWS_CODESIGN_FILE']) {
9 | const certPath = path.join(__dirname, 'win-certificate.pfx');
10 | const certExists = fs.existsSync(certPath);
11 |
12 | if (certExists) {
13 | process.env['WINDOWS_CODESIGN_FILE'] = certPath;
14 | }
15 | }
16 |
17 |
18 | const config = {
19 | packagerConfig: {
20 | name: 'api-video',
21 | executableName: 'api-video',
22 | asar: true,
23 | icon: path.resolve(__dirname, 'src', 'assets', 'api-video-logo'),
24 | appBundleId: 'video.api.synchronizer',
25 | appCategoryType: 'public.app-category.video',
26 | win32metadata: {
27 | CompanyName: 'api.video',
28 | OriginalFilename: 'api-video',
29 | },
30 | osxSign: {
31 | identity: 'Developer ID Application: Anthony Dantard (GBC36KP98K)',
32 | hardenedRuntime: true,
33 | 'gatekeeper-assess': false,
34 | entitlements: 'entitlements.plist',
35 | 'entitlements-inherit': 'entitlements.plist',
36 | 'signature-flags': 'library',
37 | },
38 | },
39 | makers: [
40 | {
41 | name: '@electron-forge/maker-squirrel',
42 | platforms: ['win32'],
43 | config: (arch) => {
44 | return {
45 | name: 'api-video',
46 | authors: 'api.video',
47 | exe: 'api-video.exe',
48 | setupExe: `api-video-win32-${arch}-setup.exe`,
49 | setupIcon: path.resolve(__dirname, 'src', 'assets', 'api-video-logo.ico'),
50 | };
51 | },
52 | },
53 | {
54 | name: '@electron-forge/maker-dmg',
55 | platforms: ['darwin'],
56 | config: {
57 | format: 'ULFO',
58 | name: 'api-video',
59 | icon: path.resolve(__dirname, 'src', 'assets', 'api-video-logo.icns'),
60 | }
61 | },
62 | {
63 | name: '@electron-forge/maker-zip',
64 | platforms: ['darwin']
65 | }
66 | ],
67 | publishers: [
68 | {
69 | name: '@electron-forge/publisher-github',
70 | config: {
71 | repository: {
72 | owner: 'electron',
73 | name: 'fiddle',
74 | },
75 | draft: true,
76 | prerelease: false,
77 | },
78 | },
79 | ],
80 | };
81 |
82 | function notarizeMaybe() {
83 | if (process.platform !== 'darwin') {
84 | return;
85 | }
86 |
87 | if (!process.env.CI) {
88 | console.log(`Not in CI, skipping notarization`);
89 | return;
90 | }
91 |
92 | if (!process.env.APPLE_ID || !process.env.APPLE_ID_PASSWORD) {
93 | console.warn(
94 | 'Should be notarizing, but environment variables APPLE_ID or APPLE_ID_PASSWORD are missing!',
95 | );
96 | return;
97 | }
98 |
99 | config.packagerConfig.osxNotarize = {
100 | appBundleId: 'video.api.synchronizer',
101 | appleId: process.env.APPLE_ID,
102 | appleIdPassword: process.env.APPLE_ID_PASSWORD
103 | };
104 | }
105 |
106 | notarizeMaybe();
107 |
108 | // Finally, export it
109 | module.exports = config;
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "api-video-file-synchronizer",
3 | "productName": "api-video-file-synchronizer",
4 | "version": "0.1.2",
5 | "description": "My Electron application description",
6 | "main": "dist/index.js",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/apivideo/api.video-desktop-synchronizer"
10 | },
11 | "scripts": {
12 | "start": "tsc && electron-forge start",
13 | "package": "electron-forge package",
14 | "make": "tsc && cp -R src/assets dist && electron-forge make",
15 | "publish": "electron-forge publish",
16 | "lint": "eslint --ext .ts ."
17 | },
18 | "keywords": [],
19 | "author": {
20 | "name": "Olivier Lando",
21 | "email": "olivier@api.video"
22 | },
23 | "license": "MIT",
24 | "config": {
25 | "forge": "./forge.config.js"
26 | },
27 | "devDependencies": {
28 | "@electron-forge/cli": "^6.0.0-beta.61",
29 | "@electron-forge/maker-deb": "^6.0.0-beta.61",
30 | "@electron-forge/maker-dmg": "^6.0.0-beta.61",
31 | "@electron-forge/maker-rpm": "^6.0.0-beta.61",
32 | "@electron-forge/maker-squirrel": "^6.0.0-beta.61",
33 | "@electron-forge/maker-zip": "^6.0.0-beta.61",
34 | "@types/electron-store": "^3.2.0",
35 | "@typescript-eslint/eslint-plugin": "^4.17.0",
36 | "@typescript-eslint/parser": "^4.17.0",
37 | "electron": "16.0.2",
38 | "eslint": "^7.6.0",
39 | "eslint-plugin-import": "^2.20.0",
40 | "typescript": "^4.0.2"
41 | },
42 | "dependencies": {
43 | "@api.video/nodejs-client": "^2.0.14",
44 | "chokidar": "^3.5.2",
45 | "electron-notification-state": "^1.0.4",
46 | "electron-squirrel-startup": "^1.0.0",
47 | "electron-store": "^8.0.1",
48 | "node-fetch": "^3.1.0",
49 | "queue-promise": "^2.2.1",
50 | "update-electron-app": "^2.0.1"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/activity-client.ts:
--------------------------------------------------------------------------------
1 | import { UploadStatuses } from "./synchronizer";
2 |
3 | const ipc = require('electron').ipcRenderer;
4 |
5 |
6 | const updateStatuses = (statuses: UploadStatuses) => {
7 | const statusesContainer = document.getElementById("logs");
8 | statusesContainer.innerHTML = "";
9 | for (const hash in statuses) {
10 | const status = statuses[hash];
11 | const lineDiv = document.createElement("div");
12 | const filenameDiv = document.createElement("div");
13 | const dotsDiv = document.createElement("div");
14 | dotsDiv.className = "dots";
15 | const statusDiv = document.createElement("div");
16 | lineDiv.className = "logline";
17 | filenameDiv.innerHTML = status.filename;
18 | if (!status.link || status.status == "PROCESSING") {
19 | statusDiv.innerHTML = status.status === "IN_PROGRESS" ? Math.round(status.percent * 100) + "%" : status.status;
20 | } else {
21 | const link = document.createElement("button");
22 | link.innerHTML = "VIEW";
23 | link.onclick = () => ipc.send('open-in-browser', status.link);
24 | statusDiv.appendChild(link);
25 | }
26 | lineDiv.appendChild(filenameDiv);
27 | lineDiv.appendChild(dotsDiv);
28 | lineDiv.appendChild(statusDiv);
29 | statusesContainer.appendChild(lineDiv);
30 | }
31 | }
32 |
33 |
34 | window.addEventListener('DOMContentLoaded', () => {
35 | ipc.on('uploadStatuses', (event, arg) => {
36 | updateStatuses(arg);
37 | })
38 | ipc.send('get-statuses');
39 | })
--------------------------------------------------------------------------------
/src/activity-window.ts:
--------------------------------------------------------------------------------
1 | import { BrowserWindow, ipcMain, shell } from "electron";
2 | import * as path from 'path';
3 | import { UploadStatuses } from "./synchronizer";
4 |
5 |
6 | export default class ActivityWindow {
7 | private browserWindow?: BrowserWindow;
8 | private uploadStatuses: UploadStatuses = {};
9 |
10 | show() {
11 | if (!this.browserWindow) {
12 | this.browserWindow = this.createBrowserWindow();
13 | this.browserWindow.setMenu(null);
14 | this.browserWindow.loadFile('dist/assets/activity.html');
15 | this.browserWindow.on('close', () => this.onClose());
16 |
17 | ipcMain.on('open-in-browser', (event, url) => shell.openExternal(url));
18 | ipcMain.on('get-statuses', (event, arg) => event.reply('uploadStatuses', this.uploadStatuses));
19 | }
20 | this.browserWindow.show();
21 | }
22 |
23 | setUploadStatuses(uploadStatuses: UploadStatuses) {
24 | this.uploadStatuses = uploadStatuses;
25 | if(this.browserWindow) {
26 | this.browserWindow.webContents.send("uploadStatuses", uploadStatuses);
27 | }
28 | }
29 |
30 | private createBrowserWindow() {
31 | return new BrowserWindow({
32 | width: 640,
33 | height: 380,
34 | webPreferences: {
35 | preload: path.join(__dirname, 'activity-client.js')
36 | }
37 | });
38 | }
39 |
40 | private onClose() {
41 | this.browserWindow = undefined;
42 | ipcMain.removeAllListeners('get-statuses');
43 | ipcMain.removeAllListeners('open-in-browser');
44 | }
45 | }
--------------------------------------------------------------------------------
/src/assets/Logo_white_text.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/activity.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | api.video uploader
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/assets/api-video-logo.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/src/assets/api-video-logo.icns
--------------------------------------------------------------------------------
/src/assets/api-video-logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/src/assets/api-video-logo.ico
--------------------------------------------------------------------------------
/src/assets/green-dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/src/assets/green-dot.png
--------------------------------------------------------------------------------
/src/assets/orange-dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apivideo/api.video-desktop-synchronizer/3a6d0d4b7b5022031415cc266c7cbaa308b91da1/src/assets/orange-dot.png
--------------------------------------------------------------------------------
/src/assets/settings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | api.video uploader
10 |
11 |
12 |
13 |