Skip to content

Commit

Permalink
Merge pull request #31 from skyway/release/v1.1.0
Browse files Browse the repository at this point in the history
Release/v1.1.0
  • Loading branch information
riosu committed Dec 4, 2017
2 parents e6277f1 + b634c58 commit 8853f40
Show file tree
Hide file tree
Showing 16 changed files with 9,507 additions and 4,887 deletions.
20 changes: 13 additions & 7 deletions .circleci/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
#!/bin/bash

# Skip if executed in a forked repository or local
if [ "${AWS_ACCESS_KEY_ID}" == "" ] || [ "${AWS_SECRET_ACCESS_KEY}" == "" ]; then
if [ "${AWS_ACCESS_KEY_ID}" == "" ] || [ "${AWS_SECRET_ACCESS_KEY}" == "" ] ||
[ "${NPM_USER}" == "" ] || [ "${NPM_EMAIL}" == "" ] || [ "${NPM_PASS}" == "" ]; then
echo "Skipped."
exit 0
fi

# Set environment variables
if [ "${CIRCLE_BRANCH}" == "master" ]; then
# Production
# s3_dist_bucket="s3://eclrtc-cdn-production/"
# s3_example_bucket="s3://eclrtc-example-production"
s3_dist_bucket="s3://eclrtc-cdn-staging/"
s3_example_bucket="s3://eclrtc-example-staging"
s3_dist_bucket="s3://eclrtc-cdn-production/"
s3_example_bucket="s3://eclrtc-example-production"
examples_sdk_url="\/\/cdn.webrtc.ecl.ntt.com\/skyway-latest.js"
base_domain="\.webrtc\.ecl\.ntt\.com"

# Publish to npm
echo -e "$NPM_USER\n$NPM_PASS\n$NPM_EMAIL" | npm login
npm publish --access public

elif [[ "${CIRCLE_BRANCH}" =~ "release/" ]]; then
# Staging
s3_dist_bucket="s3://eclrtc-cdn-staging/"
s3_example_bucket="s3://eclrtc-example-staging/"
examples_sdk_url="\/\/cdn.stage.ecl.skyway.io\/skyway-latest.js"

base_domain="\.stage\.ecl\.skyway\.io"
else
echo "Skipped."
exit 0
fi

# Set API key for examples
skyway_apikey="5bea388b-3f95-4e1e-acb5-a34efdd0c480"
echo "window.__SKYWAY_KEY__ = '${skyway_apikey}';" > ./examples/key.js;

# Set file paths
# Replace variable
find examples -name index.html | xargs sed -i -e "s/\"\/\/cdn\.webrtc\.ecl\.ntt\.com\/skyway-latest\.js\"/\"${examples_sdk_url}\"/g"
find dist -name "*.js" | xargs sed -i -e "s/\.webrtc\.ecl\.ntt\.com/${base_domain}/g"

# Set aws keys
export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [v1.1.0](https://github.com/skyway/skyway-js-sdk/releases/tag/v1.1.0) - 2017-12-04

### Added

- New options to `peer.call()/peer.joinRoom()` (videoReceiveEnabled/audioReceiveEnabled) which enabled you to receive audio while sending video and vice versa ([PR #25](https://github.com/skyway/skyway-js-sdk/pull/25))
- Support unreliable datachannel by adding a new option to `peer.connect()` (dcInit) which allows you to set the options shown [here](https://www.w3.org/TR/webrtc/#dom-rtcdatachannelinit) ([PR #26](https://github.com/skyway/skyway-js-sdk/pull/26))
- [npm support](https://www.npmjs.com/package/skyway-js) ([PR #27](https://github.com/skyway/skyway-js-sdk/pull/27))

### Fixed

- Fixed bug where adding a previously non-existent track when calling `replaceStream()` failed. ([PR #12](https://github.com/skyway/skyway-js-sdk/pull/12))
- make sure to set xReceiveEnabled when you initially don't have a media track of type 'x' but might be receiving one later

## [v1.0.1](https://github.com/skyway/skyway-js-sdk/releases/tag/v1.0.1) - 2017-09-11

### Added
Expand Down
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
# SkyWay JS
# SkyWay JavaScript SDK

## Using the SDK

### Including the sdk from the CDN in your html

Add the following script tag to your html file.

```html
<script type="text/javascript" src="https://cdn.webrtc.ecl.ntt.com/skyway-latest.js"></script>
```

You can then use the `Peer` object to start connecting.
For more details, check out the [Tutorial](https://webrtc.ecl.ntt.com/en/js-tutorial.html). ([日本語](https://webrtc.ecl.ntt.com/js-tutorial.html))

### Installing using npm to use with a bundler (e.g. webpack or browserify)

With [npm](https://npmjs.org/) installed, run

$ npm install -g skyway-js

You can then use `require` or `import` to import the package.

```js
// require
const Peer = require('skyway-js');
const peer = new Peer({key: 'your-api-key'});

// import
import Peer from 'skyway-js';
const peer = new Peer({key: 'your-api-key'});
```

## Docs

- [API reference](https://webrtc.ecl.ntt.com/en/js-reference/)([日本語](https://webrtc.ecl.ntt.com/js-reference/))
- [Tutorial](https://webrtc.ecl.ntt.com/en/js-tutorial.html)([日本語](https://webrtc.ecl.ntt.com/js-tutorial.html))
- [Sample Code](https://github.com/skyway/skyway-js-sdk/tree/master/examples/)

## Examples

Expand Down

0 comments on commit 8853f40

Please sign in to comment.