玩瞳文档中心


extradata音频数据解析

<h3>概述</h3> <p>该部分接口的入口类为 <strong>LangMgr</strong>,在调用该部分接口前,需要初始化license。</p> <h3>1. 构造函数</h3> <p><strong>接口名称:</strong></p> <pre><code class="language-java">public LangMgr(Class&lt;? extends DefaultLang&gt; cls)</code></pre> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>cls</td> <td>Class&lt;? extends DefaultLang&gt;</td> <td>解析类型</td> </tr> </tbody> </table> <p><strong>说明:</strong> DefautLang 返回所有音频URL EnLang 继承DefaultLang 返回英文音频URL ZhLang 继承DefaultLang 返回中文音频URL ExplainLang 继承DefaultLang 返回知识点URL</p> <h3>2. 获取音频接口</h3> <h4>2.1 获取音频</h4> <p><strong>接口名称:</strong></p> <pre><code class="language-java">public boolean handUrl(String extraData, DefaultLang.UrlOnComplete url)</code></pre> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>extraData</td> <td>String</td> <td>识别或者手指中返回的extradata</td> </tr> <tr> <td>url</td> <td>DefaultLang.UrlOnComplete</td> <td>音频数据回调</td> </tr> </tbody> </table> <h4>2.2 UrlOnComplete</h4> <p>该回调类用于监听下载状态的回调,接口类如下:</p> <pre><code class="language-java">public static interface UrlOnComplete { void onComplete(List&lt;VTK12AudioBean&gt; urls); }</code></pre> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>urls</td> <td>List<VTK12AudioBean></td> <td>返回的数据</td> </tr> </tbody> </table> <h4>2.3 VTK12AudioBean</h4> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>url</td> <td>String</td> <td>音频URL</td> </tr> <tr> <td>detail_name</td> <td>String</td> <td>知识点视频的名字 其他为null</td> </tr> </tbody> </table> <h3>3. 取消当前获取音频的网络请求</h3> <p><strong>接口名称:</strong></p> <pre><code class="language-java">public void onPause()</code></pre> <h3>4. 销毁</h3> <p><strong>接口名称:</strong></p> <pre><code class="language-java">public void onDestory()</code></pre>

页面列表

ITEM_HTML