-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0b85f5
commit bd99a33
Showing
4 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ build/ | |
|
||
# Directory created by dartdoc | ||
doc/api/ | ||
|
||
# Mac OS. | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## 1.0.0-a2 | ||
|
||
- Initial version. | ||
## 0.3.0 | ||
|
||
- Crib `pub run grinder package` from [dart-sass](https://github.com/sass/dart-sass). | ||
- Clean up `serve` API in preparation for UI development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
# Cacao Proxy - CORS Access-Control-Allow-Origin Proxy | ||
# Cacao (CORS Access-Control-Allow-Origin) Proxy | ||
|
||
Cacao is a Cross-Origin (CORS) proxy. It allows Javascript running in a web browser to access a remote HTTP resource without cross-origin restrictions. It runs on several different platforms, and essentially works by adding a `Access-Control-Allow-Origin: *` header to an HTTP response. | ||
Cacao is a localhost Cross-Origin (CORS) proxy. It allows Javascript running in a web browser to access a remote HTTP resource without cross-origin restrictions. It runs on several different platforms, and essentially works by adding a `Access-Control-Allow-Origin: *` header to an HTTP response. | ||
|
||
## IP Camera Streaming | ||
|
||
The main use case is to access a remote streaming MJPEG URL published by an IP Camera, via an `<img>` tag pointing to Cacao. Without Cacao, this image data is usually marked as cross-origin, and therefore cannot be used as the source for a WebRTC stream. | ||
|
||
With Cacao, the `<img>` can be copied to a `<canvas>` and then (since CORS is allowed) sent by the browser via WebRTC. | ||
With Cacao, an `<img crossorigin>` can be copied to a `<canvas>` and then (since CORS is allowed) sent by the browser via WebRTC. Try loading the (MJPEG sample)[static/mjpeg.html] in your browser to experiment with this capability, and to understand the vanilla Javascript source code. | ||
|
||
TODO: The [Mediasoup Broadcast Example](https://github.com/michaelfig/mediasoup-broadcast-example) will contain an example of using Cacao to make an IP Camera publishable via WebRTC. | ||
|
||
TODO: Include other use-cases. | ||
The [Mediasoup Broadcast Example](https://github.com/michaelfig/mediasoup-broadcast-example) will eventually add support for using Cacao to request media to stream. | ||
|
||
## Usage | ||
|
||
### Standalone Cacao Proxy | ||
### Cacao Proxy | ||
|
||
Cacao can be run as a localhost proxy server on Linux (and other Unix-like), MacOS, and Windows. | ||
|
||
Cacao can be run as a proxy server on Linux (and other Unix-like), MacOS, and Windows. | ||
Download a binary package from the [Cacao releases](https://github.com/michaelfig/cacao/releases), if you just want to use the proxy (and not change its code). | ||
|
||
If you are a developer, you can run Cacao directly from sources in this project, but you will first need to install the [Dart SDK](https://www.dartlang.org/tools/sdk#install): | ||
|
||
You first need to install the [Dart SDK](https://www.dartlang.org/tools/sdk#install), then run: | ||
``` | ||
$ cd bin | ||
$ cacao --help | ||
$ dart --version | ||
$ bin/cacao --help | ||
``` | ||
|
||
### Cacao Proxy App | ||
|
||
See the [Cacao Proxy App](https://github.com/michaelfig/cacao_app) for a graphical app for controlling a builtin Cacao proxy on your mobile device. | ||
|
||
Michael FIG <[email protected]>, 2018-12-05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: cacao | ||
description: CORS Access-Control-Allow-Origin Proxy | ||
version: 0.3.0-dev.1 | ||
description: Cacao (CORS Access-Control-Allow-Origin) Proxy | ||
version: 0.3.0 | ||
homepage: https://github.com/michaelfig/cacao | ||
author: Michael FIG <[email protected]> | ||
|
||
|
@@ -12,5 +12,10 @@ dependencies: | |
|
||
dev_dependencies: | ||
archive: ^2.0.0 | ||
test: ^1.0.0 | ||
grinder: ^0.8.0 | ||
http: ^0.12.0 | ||
meta: ^1.1.0 | ||
path: ^1.6.0 | ||
pub_semver: ^1.4.0 | ||
test: ^1.0.0 | ||
yaml: ^2.1.0 |