Skip to content

Commit

Permalink
Added fbr@2.0.5 and fbr-client@1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
muaz-khan committed Jan 20, 2017
1 parent 2ebb725 commit 04b674f
Show file tree
Hide file tree
Showing 13 changed files with 1,934 additions and 264 deletions.
8 changes: 4 additions & 4 deletions FileBufferReader.js
@@ -1,4 +1,4 @@
// Last time updated: 2016-11-04 7:11:11 AM UTC
// Last time updated: 2017-01-18 10:28:28 AM UTC

// ________________
// FileBufferReader
Expand Down Expand Up @@ -254,7 +254,7 @@
size: file.size,
name: file.name,
type: file.type,
lastModifiedDate: file.lastModifiedDate.toString(),
lastModifiedDate: (file.lastModifiedDate || new Date()).toString(),
start: true
});

Expand All @@ -278,7 +278,7 @@
maxChunks: maxChunks,
size: file.size,
name: file.name,
lastModifiedDate: file.lastModifiedDate.toString(),
lastModifiedDate: (file.lastModifiedDate || new Date()).toString(),
url: URL.createObjectURL(file),
type: file.type,
end: true
Expand Down Expand Up @@ -307,7 +307,7 @@

size: file.size,
name: file.name,
lastModifiedDate: file.lastModifiedDate.toString(),
lastModifiedDate: (file.lastModifiedDate || new Date()).toString(),
type: file.type
});

Expand Down
4 changes: 2 additions & 2 deletions FileBufferReader.min.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions README.md
Expand Up @@ -2,6 +2,8 @@

[![npm](https://img.shields.io/npm/v/fbr.svg)](https://npmjs.org/package/fbr) [![downloads](https://img.shields.io/npm/dm/fbr.svg)](https://npmjs.org/package/fbr) [![Build Status: Linux](https://travis-ci.org/muaz-khan/FileBufferReader.png?branch=master)](https://travis-ci.org/muaz-khan/FileBufferReader)

All released versions: https://github.com/muaz-khan/FileBufferReader/releases

Using FileBufferReader.js, you can:

1. Get list of array-buffers with each specific chunkSize
Expand All @@ -23,7 +25,7 @@ WebRTC_Data_Channel.binaryType = 'arraybuffer';
It is <a href="https://www.webrtc-experiment.com/licence/">MIT Licenced</a>, which means that you can use it in any commercial/non-commercial product, free of cost.

```sh
npm install fbr
npm install fbr --production

# or using bower
bower install fbr
Expand All @@ -33,6 +35,9 @@ To use it:

```html
<script src="./node_modules/fbr/FileBufferReader.js"></script>

<!-- or CDN -->
<script src="https://cdn.webrtc-experiment.com/FileBufferReader.js"></script>
```

Or run localhost server:
Expand All @@ -54,10 +59,11 @@ npm install fbr-client
Then run the server:

```sh
node ./node_modules/fbr-client/server.js
cd ./node_modules/fbr-client
node server.js port=9001
```

Then open: `http://localhost:8888/` or `http://127.0.0.1:8888/`.
Then open: `http://localhost:9001/` or `http://127.0.0.1:9001/`.

> You can modify development files from the `dev` directory; and use `grunt` tool to recompile into `FileBufferReader.js`.
Expand Down
6 changes: 3 additions & 3 deletions dev/FileBufferReaderHelper.js
Expand Up @@ -92,7 +92,7 @@ function FileBufferReaderHelper() {
size: file.size,
name: file.name,
type: file.type,
lastModifiedDate: file.lastModifiedDate.toString(),
lastModifiedDate: (file.lastModifiedDate || new Date()).toString(),
start: true
});

Expand All @@ -116,7 +116,7 @@ function FileBufferReaderHelper() {
maxChunks: maxChunks,
size: file.size,
name: file.name,
lastModifiedDate: file.lastModifiedDate.toString(),
lastModifiedDate: (file.lastModifiedDate || new Date()).toString(),
url: URL.createObjectURL(file),
type: file.type,
end: true
Expand Down Expand Up @@ -145,7 +145,7 @@ function FileBufferReaderHelper() {

size: file.size,
name: file.name,
lastModifiedDate: file.lastModifiedDate.toString(),
lastModifiedDate: (file.lastModifiedDate || new Date()).toString(),
type: file.type
});

Expand Down
18 changes: 14 additions & 4 deletions fbr-client/README.md
Expand Up @@ -2,17 +2,27 @@

Socket.io client for [FileBufferReader.js](https://github.com/muaz-khan/FileBufferReader).

```
```sh
npm install fbr-client
```

Then run the server:

```sh
cd ./node_modules/fbr-client/
node server.js
```
node ./node_modules/fbr-client/server.js
```

Then open: `http://localhost:8888/` or `http://local-ip:8888/`.
Then open: `http://localhost:9001/` or `http://local-ip:9001/`.

# Change Port

```sh
node server.js port=80

# or
node server.js port=8888
```

## Credits

Expand Down

0 comments on commit 04b674f

Please sign in to comment.