Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README ably clientOptions #30

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,24 @@ window.Echo.connector.ably.connection.on(stateChange => {
console.log('connected to ably server');
}
});

```
- Take a look at [laravel broadcasting auth-endpoint doc](https://laravel.com/docs/broadcasting#customizing-the-authorization-endpoint) for customizing authEndpoint.
```
broadcaster: 'ably',
authEndpoint: '/broadcasting/auth' // relative or absolute url to laravel-server
```
You can set additional ably-js [clientOptions](https://ably.com/docs/api/realtime-sdk?lang=javascript#client-options) when creating an `Echo` instance.

- You can set additional ably-js [clientOptions](https://ably.com/docs/api/realtime-sdk?lang=javascript#client-options) when creating an `Echo` instance.
- [Auth specific clientOptions](https://sdk.ably.com/builds/ably/specification/main/features/#AO1) should not be used, since laravel `authEndpoint` is already responsible for token authentication and external auth mechanism is not needed.

```
broadcaster: 'ably',
authEndpoint: 'http://www.localhost:8000/broadcasting/auth', // absolute or relative url to laravel-server
port: '80',
environment : 'custom-environment', // https://ably.com/docs/platform-customization#setting-up-a-custom-environment
echoMessages: true // By default self-echo for published message is false
echoMessages: true, // self-echo for published message is set to false internally.
queueMessages: true, // default: true, maintains queue for messages to be sent.
disconnectedRetryTimeout: 15000, // Retry connect after 15 seconds when client gets disconnected
```

Once you have uncommented and adjusted the Echo configuration according to your needs, you may compile your application's assets:

```shell
Expand Down