Skip to content

Commit

Permalink
Update readme and example index file to reflect cdn usage
Browse files Browse the repository at this point in the history
  • Loading branch information
QVDev committed Sep 5, 2019
1 parent c526392 commit fa54362
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ For an example use the index.html and the .js folder.
<head>
...
<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<script type="text/javascript" src="js/GunRecorder.js"></script>
<script type="text/javascript" src="js/GunStreamer.js"></script>
<script src="https://cdn.jsdelivr.net/gh/QVDev/[email protected]/js/GunRecorder.js"></script>
<script src="https://cdn.jsdelivr.net/gh/QVDev/[email protected]/js/GunStreamer.js"></script>
...
</head>
```
Expand All @@ -22,13 +22,14 @@ For an example use the index.html and the .js folder.
<button id="record_button" type="button" onclick="gunRecorder.record()">Start Recording</button>
<br><br>
<video id="record_video" width="20%" poster="https://www.srsd.net/images/video-poster.png" autoplay controls muted />
<script type="text/javascript" src="js/initialiation.js"></script>
<script src="https://cdn.jsdelivr.net/gh/QVDev/[email protected]/js/integration.js"></script><!-- Default integration -->
...
</body>
```

### initialiation.js
The gun part, writing to gun and publish it.
### initialiation.js
In case you are not using the default integration. You can create own initialiation.js The gun part, writing to gun and publish it.
Just make sure to refer it at the end of the body as a script.
```javascript
//Configure GUN to pass to streamer
var peers = ['https://gunmeetingserver.herokuapp.com/gun'];
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<meta charset="utf-8">
<title></title>
<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<script type="text/javascript" src="js/GunRecorder.js"></script>
<script type="text/javascript" src="js/GunStreamer.js"></script>
<script src="https://cdn.jsdelivr.net/gh/QVDev/[email protected]/js/GunRecorder.js"></script>
<script src="https://cdn.jsdelivr.net/gh/QVDev/[email protected]/js/GunStreamer.js"></script>
</head>

<body>
<button type="button" onclick="gunRecorder.startCamera()">Start Camera</button>
<button id="record_button" type="button" onclick="gunRecorder.record()">Start Recording</button>
<br><br>
<video id="record_video" width="20%" poster="https://www.srsd.net/images/video-poster.png" autoplay controls muted />
<script type="text/javascript" src="js/integration.js"></script>
<script src="https://cdn.jsdelivr.net/gh/QVDev/[email protected]/js/integration.js"></script>
</body>

</html>

0 comments on commit fa54362

Please sign in to comment.