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

Fix ios, firefox #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
46 changes: 23 additions & 23 deletions docs/classes/WillowClient.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="tsd-page-title">
<h2>@tovera/willow-ts-client</h2></div>
<div class="tsd-panel tsd-typography"><p><img src="docs/icon.png" alt=""></p>
<a id="md:willow-ts-client" class="tsd-anchor"></a><h1><a href="#md:willow-ts-client">Willow TS Client</a></h1><p>This repo contains the TypeScript client for interacting with Willow&#39;s WebRTC component. Detailed docs can be <a href="https://toverainc.github.io/willow-ts-client/">found here</a>.</p>
<a id="md:willow-ts-client" class="tsd-anchor"></a><h1><a href="#md:willow-ts-client">Willow TS Client</a></h1><p>This repo contains the TypeScript client for interacting with Willow Inference Server WebRTC transport. Detailed docs can be <a href="https://toverainc.github.io/willow-ts-client/">found here</a>.</p>
<a id="md:installation" class="tsd-anchor"></a><h2><a href="#md:installation">Installation</a></h2><pre><code class="language-bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">@tovera/willow-ts-client</span>
</code><button>Copy</button></pre>
<a id="md:basic-usage" class="tsd-anchor"></a><h2><a href="#md:basic-usage">Basic Usage</a></h2><pre><code class="language-typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">WillowClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;@tovera/willow-ts-client&#39;</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">WillowClient</span><span class="hl-1">({ </span><span class="hl-4">host:</span><span class="hl-1"> </span><span class="hl-2">&quot;http://localhost:19000/api/rtc/asr&quot;</span><span class="hl-1"> })</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;onOpen&#39;</span><span class="hl-1">, () </span><span class="hl-5">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Connection open. Recording for 30 seconds.&#39;</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">start</span><span class="hl-1">()</span><br/><span class="hl-1"> </span><span class="hl-0">setTimeout</span><span class="hl-1">(()</span><span class="hl-5">=&gt;</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">stop</span><span class="hl-1">(), </span><span class="hl-7">30</span><span class="hl-1">*</span><span class="hl-7">1000</span><span class="hl-1">)</span><br/><span class="hl-1">})</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;onLog&#39;</span><span class="hl-1">, (</span><span class="hl-4">log</span><span class="hl-1">) </span><span class="hl-5">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Verbose server log: &#39;</span><span class="hl-1"> + </span><span class="hl-4">log</span><span class="hl-1">)</span><br/><span class="hl-1">})</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;onError&#39;</span><span class="hl-1">, (</span><span class="hl-4">err</span><span class="hl-1">) </span><span class="hl-5">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;Willow WebRTC Error&#39;</span><span class="hl-1">, </span><span class="hl-4">err</span><span class="hl-1">)</span><br/><span class="hl-1">})</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;onInfer&#39;</span><span class="hl-1">, (</span><span class="hl-4">msg</span><span class="hl-1">) </span><span class="hl-5">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Got result </span><span class="hl-5">${</span><span class="hl-4">msg</span><span class="hl-8">.</span><span class="hl-4">text</span><span class="hl-5">}</span><span class="hl-2"> in </span><span class="hl-5">${</span><span class="hl-4">msg</span><span class="hl-8">.</span><span class="hl-4">time</span><span class="hl-5">}</span><span class="hl-2">ms`</span><span class="hl-1">)</span><br/><span class="hl-1">})</span><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">init</span><span class="hl-1">();</span>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/DataChannelMessage.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">DataChannelMessage</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L30">src/index.ts:30</a></li></ul></aside>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L30">src/index.ts:30</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand All @@ -46,17 +46,17 @@ <h2>Properties</h2>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>message</span><a href="#message" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L32">src/index.ts:32</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L32">src/index.ts:32</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="obj" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>obj</span><a href="#obj" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">obj</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type tsd-kind-type-parameter">T</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L33">src/index.ts:33</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L33">src/index.ts:33</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L31">src/index.ts:31</a></li></ul></aside></section></section></div>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L31">src/index.ts:31</a></li></ul></aside></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/WillowClientConfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">WillowClientConfig</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L20">src/index.ts:20</a></li></ul></aside>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L20">src/index.ts:20</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand All @@ -43,21 +43,21 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code
<div class="tsd-comment tsd-typography"><p>See <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia">https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia</a></p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L22">src/index.ts:22</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L22">src/index.ts:22</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="host" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>host</span><a href="#host" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">host</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
<div class="tsd-comment tsd-typography"><p>The host to connect to for infrance. This should include path.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L26">src/index.ts:26</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L26">src/index.ts:26</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="rtcConfig" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>rtc<wbr/>Config</span><a href="#rtcConfig" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">rtc<wbr/>Config</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type ">RTCConfiguration</span></div>
<div class="tsd-comment tsd-typography"><p>See <a href="https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection">https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection</a></p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L24">src/index.ts:24</a></li></ul></aside></section></section></div>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L24">src/index.ts:24</a></li></ul></aside></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/types/WillowClientEvents.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h5><span class="tsd-kind-property">on<wbr/>Open</span><span class="tsd-signatur
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/toverainc/air-infer-client/blob/83b91d8/src/index.ts#L4">src/index.ts:4</a></li></ul></aside></div>
<li>Defined in <a href="https://github.com/toverainc/willow-ts-client/blob/78edd16/src/index.ts#L4">src/index.ts:4</a></li></ul></aside></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tovera/willow-ts-client",
"version": "0.8.9",
"version": "0.8.10",
"description": "",
"main": "dist/bundle.js",
"types": "dist/index.d.ts",
Expand All @@ -26,5 +26,10 @@
"typescript": "^5.0.2",
"webpack": "^5.77.0",
"webpack-cli": "^5.0.1"
}
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
]
}
Loading