From 0ed4444c1df22c4f660146f689a9a9bf39d87445 Mon Sep 17 00:00:00 2001 From: sylenien Date: Mon, 12 Dec 2022 17:51:15 +0100 Subject: [PATCH] change(tracker): add docs link to readme --- tracker/tracker-assist/README.md | 8 +++++-- tracker/tracker/README.md | 40 ++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/tracker/tracker-assist/README.md b/tracker/tracker-assist/README.md index 4897477b3..a09d201b1 100644 --- a/tracker/tracker-assist/README.md +++ b/tracker/tracker-assist/README.md @@ -2,6 +2,10 @@ OpenReplay Assist Plugin allows you to support your users by seeing their live screen and instantly hopping on call (WebRTC) with them without requiring any 3rd-party screen sharing software. +## Documentation + +For launch options and available public methods, (refer to the documentation)[https://docs.openreplay.com/plugins/assist] + ## Installation ```bash @@ -72,7 +76,7 @@ trackerAssist({ type ConfirmOptions = { text?:string, style?: StyleObject, // style object (i.e {color: 'red', borderRadius: '10px'}) - confirmBtn?: ButtonOptions, + confirmBtn?: ButtonOptions, declineBtn?: ButtonOptions } @@ -82,7 +86,7 @@ type ButtonOptions = HTMLButtonElement | string | { } ``` -- `callConfirm`: Customize the text and/or layout of the call request popup. +- `callConfirm`: Customize the text and/or layout of the call request popup. - `controlConfirm`: Customize the text and/or layout of the remote control request popup. - `config`: Contains any custom ICE/TURN server configuration. Defaults to `{ 'iceServers': [{ 'urls': 'stun:stun.l.google.com:19302' }], 'sdpSemantics': 'unified-plan' }`. - `onAgentConnect: () => (()=>void | void)`: This callback function is fired when someone from OpenReplay UI connects to the current live session. It can return another function. In this case, returned callback will be called when the same agent connection gets closed. diff --git a/tracker/tracker/README.md b/tracker/tracker/README.md index c47f301dc..d28ab18ff 100644 --- a/tracker/tracker/README.md +++ b/tracker/tracker/README.md @@ -2,10 +2,14 @@ The main package of the [OpenReplay](https://openreplay.com/) tracker. +## Documentation + +For launch options and available public methods, (refer to the documentation)[https://docs.openreplay.com/installation/javascript-sdk#options] + ## Installation ```bash -npm i @openreplay/tracker +npm i @openreplay/tracker ``` ## Usage @@ -13,30 +17,30 @@ npm i @openreplay/tracker Initialize the package from your codebase entry point and start the tracker. You must set the `projectKey` option in the constructor. Its value can can be found in your OpenReplay dashboard under [Preferences -> Projects](https://app.openreplay.com/client/projects). ```js -import Tracker from '@openreplay/tracker'; +import Tracker from '@openreplay/tracker' const tracker = new Tracker({ projectKey: YOUR_PROJECT_KEY, -}); -tracker.start({ - userID: "Mr.Smith", - metadata: { - version: "3.5.0", - balance: "10M", - role: "admin", - } -}).then(startedSession => { - if (startedSession.success) { - console.log(startedSession) - } }) +tracker + .start({ + userID: 'Mr.Smith', + metadata: { + version: '3.5.0', + balance: '10M', + role: 'admin', + }, + }) + .then((startedSession) => { + if (startedSession.success) { + console.log(startedSession) + } + }) ``` Then you can use OpenReplay JavaScript API anywhere in your code. ```js -tracker.setUserID('my_user_id'); -tracker.setMetadata('env', 'prod'); +tracker.setUserID('my_user_id') +tracker.setMetadata('env', 'prod') ``` - -Read [our docs](https://docs.openreplay.com/) for more information.