Skip to content

Commit

Permalink
Merge pull request #13 from apivideo/feat/example/custom_file_name
Browse files Browse the repository at this point in the history
feat: Allow custom video name
  • Loading branch information
MarDi66 committed Oct 10, 2022
2 parents 7704532 + a379764 commit e050eb3
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 149 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
dist
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ tslint.json
webpack.config.js
node_modules
test
dist/test
dist/test
.github
sample
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.0.7] - 2022-10-10
- Allow the user to customize the recorded video's name

## [1.0.6] - 2022-07-06
- Update dependancies
- Add origin headers
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ Using delegated upload tokens for authentication is best options when uploading
#### Common options


| Option name | Mandatory | Type | Description |
| ----------: | --------- | ------ | ----------------------------------------------------- |
| apiHost | no | string | api.video host (default: ws.api.video) |
| retries | no | number | number of retries when an API call fails (default: 5) |
| Option name | Mandatory | Type | Description |
| ----------: | --------- | ------ | ------------------------------------------------------------------- |
| apiHost | no | string | api.video host (default: ws.api.video) |
| retries | no | number | number of retries when an API call fails (default: 5) |
| videoName | no | string | the name of your recorded video (overrides the default "file" name) |


### Example
Expand Down
1 change: 0 additions & 1 deletion dist/index.js

This file was deleted.

27 changes: 0 additions & 27 deletions dist/src/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/test/index.test.d.ts

This file was deleted.

5 changes: 4 additions & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<div>
<button id="start" disabled>start recording</button>
<button id="stop" disabled>stop recording</button>
<input type="text" id="VideoName" />
</div>
<div>
<p>Video link: <span id="video-link"><i>will be displayed when the recording is finished</i></span></p>
Expand All @@ -53,8 +54,10 @@
});

document.getElementById("start").addEventListener("click", () => {
const videoName = document.getElementById("VideoName").value
recorder = new ApiVideoMediaRecorder(stream, {
uploadToken: "UPLOAD_TOKEN"
uploadToken: "UPLOAD_TOKEN",
videoName: videoName
});

recorder.start();
Expand Down
197 changes: 85 additions & 112 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e050eb3

Please sign in to comment.