From a227aced822780ac7adbb76e35b51c5b1492962b Mon Sep 17 00:00:00 2001 From: Jim Seconde Date: Wed, 15 Jan 2025 12:20:11 +0000 Subject: [PATCH] Docs --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index a151509..0378765 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,24 @@ $options = [ 'client' => new CustomOpenTokClient(), 'timeout' => 10, ] +$opentok = new OpenTok($apiKey, $apiSecret, $options); +``` +#### Migrating to Vonage Video API + +There is some useful behaviour on initialization in this SDK that will help as a stopgap before switching out from the +legacy TokBok API to the new, Vonage Video API. To do this, you add a `private_key_path` and +`application_id` into the `$options`. Note that the SDK will read the private key path from the root directory of +the SDK, so you will need to adjust the directory structures accordingly. + +```php +use OpenTok\OpenTok; +use MyCompany\CustomOpenTokClient; + +$options = [ + 'application_id' => 'your_application_id', + 'private_key_path' => './path-to-your.key' +] + $opentok = new OpenTok($apiKey, $apiSecret, $options); ```