UNPKG

zego-express-engine-reactnative

Version:

React Native Zego Express Video for Android & iOS

800 lines 62.1 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>ZegoMediaPlayer | zego-express-engine-reactnative</title> <meta name="description" content="Documentation for zego-express-engine-reactnative"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">zego-express-engine-reactnative</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="../modules/_zegoexpressdefines_.html">&quot;ZegoExpressDefines&quot;</a> </li> <li> <a href="_zegoexpressdefines_.zegomediaplayer.html">ZegoMediaPlayer</a> </li> </ul> <h1>Class ZegoMediaPlayer</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">ZegoMediaPlayer</span> <ul class="tsd-hierarchy"> <li> <a href="_impl_zegoexpressengineimpl_.zegomediaplayerimpl.html" class="tsd-signature-type">ZegoMediaPlayerImpl</a> </li> </ul> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-external"> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#enableaux" class="tsd-kind-icon">enable<wbr>Aux</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#enablerepeat" class="tsd-kind-icon">enable<wbr>Repeat</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getaudiotrackcount" class="tsd-kind-icon">get<wbr>Audio<wbr>Track<wbr>Count</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getcurrentprogress" class="tsd-kind-icon">get<wbr>Current<wbr>Progress</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getcurrentrenderingprogress" class="tsd-kind-icon">get<wbr>Current<wbr>Rendering<wbr>Progress</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getcurrentstate" class="tsd-kind-icon">get<wbr>Current<wbr>State</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getindex" class="tsd-kind-icon">get<wbr>Index</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getplayvolume" class="tsd-kind-icon">get<wbr>Play<wbr>Volume</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#getpublishvolume" class="tsd-kind-icon">get<wbr>Publish<wbr>Volume</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#gettotalduration" class="tsd-kind-icon">get<wbr>Total<wbr>Duration</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#loadresource" class="tsd-kind-icon">load<wbr>Resource</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#mutelocal" class="tsd-kind-icon">mute<wbr>Local</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#off" class="tsd-kind-icon">off</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#on" class="tsd-kind-icon">on</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#pause" class="tsd-kind-icon">pause</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#resume" class="tsd-kind-icon">resume</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#seekto" class="tsd-kind-icon">seek<wbr>To</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setaudiotrackindex" class="tsd-kind-icon">set<wbr>Audio<wbr>Track<wbr>Index</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setplayspeed" class="tsd-kind-icon">set<wbr>Play<wbr>Speed</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setplayvolume" class="tsd-kind-icon">set<wbr>Play<wbr>Volume</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setplayerview" class="tsd-kind-icon">set<wbr>Player<wbr>View</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setprogressinterval" class="tsd-kind-icon">set<wbr>Progress<wbr>Interval</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setpublishvolume" class="tsd-kind-icon">set<wbr>Publish<wbr>Volume</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#setvolume" class="tsd-kind-icon">set<wbr>Volume</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#start" class="tsd-kind-icon">start</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegomediaplayer.html#stop" class="tsd-kind-icon">stop</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="enableaux" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> enable<wbr>Aux</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">enable<wbr>Aux<span class="tsd-signature-symbol">(</span>enable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1968</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Whether to mix the player&#39;s sound into the stream being published.</p> </div> <p>This interface will only mix the media player sound into the main channel</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>enable: <span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"> <p>Aux audio flag. The default is false.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="enablerepeat" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> enable<wbr>Repeat</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">enable<wbr>Repeat<span class="tsd-signature-symbol">(</span>enable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1948</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Whether to repeat playback.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>enable: <span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"> <p>repeat playback flag. The default is false.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getaudiotrackcount" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Audio<wbr>Track<wbr>Count</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Audio<wbr>Track<wbr>Count<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2052</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the number of audio tracks of the playback file.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>Number of audio tracks</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getcurrentprogress" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Current<wbr>Progress</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Current<wbr>Progress<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2038</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get current playing progress.</p> </div> <p>You should load resource before invoking this function, otherwise the return value is 0</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>current progress</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getcurrentrenderingprogress" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Current<wbr>Rendering<wbr>Progress</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Current<wbr>Rendering<wbr>Progress<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2046</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get current rendering progress.</p> </div> <p>You should load resource before invoking this function, otherwise the return value is 0</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>current rendering progress</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getcurrentstate" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Current<wbr>State</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Current<wbr>State<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../enums/_zegoexpressdefines_.zegomediaplayerstate.html" class="tsd-signature-type">ZegoMediaPlayerState</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2064</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the current playback status.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../enums/_zegoexpressdefines_.zegomediaplayerstate.html" class="tsd-signature-type">ZegoMediaPlayerState</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>current state</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getindex" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Index</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Index<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2074</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get media player index.</p> </div> <p>Description: Get media player index. When to call: It can be called after [createMediaPlayer]. Restrictions: None.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> <p>Media player index.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getplayvolume" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Play<wbr>Volume</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Play<wbr>Volume<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2016</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Gets the current local playback volume of the mediaplayer, the range is 0 ~ 200, with the default value of 60.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>current volume</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getpublishvolume" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Publish<wbr>Volume</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Publish<wbr>Volume<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2022</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Gets the current publish volume of the mediaplayer, the range is 0 ~ 200, with the default value of 60.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>current volume</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="gettotalduration" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Total<wbr>Duration</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Total<wbr>Duration<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2030</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the total progress of your media resources.</p> </div> <p>You should load resource before invoking this function, otherwise the return value is 0</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>Unit is millisecond</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="loadresource" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> load<wbr>Resource</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">load<wbr>Resource<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_zegoexpressdefines_.zegomediaplayerloadresourceresult.html" class="tsd-signature-type">ZegoMediaPlayerLoadResourceResult</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1915</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Load local or network media resource.</p> </div> <p>Available: since 1.3.4 Description: Load media resources. Use case: Developers can load the absolute path to the local resource or the URL of the network resource incoming. When to call: It can be called after the engine by [createEngine] has been initialized and the media player has been created by [createMediaPlayer]. Related APIs: Resources can be loaded through the [loadResourceWithPosition] or [loadResourceFromMediaData] function.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>path: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>The absolute resource path or the URL of the network resource and cannot be null or &quot;&quot;. Android can set this path string with Uri.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_zegoexpressdefines_.zegomediaplayerloadresourceresult.html" class="tsd-signature-type">ZegoMediaPlayerLoadResourceResult</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>Callback result of loading media resource.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="mutelocal" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> mute<wbr>Local</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">mute<wbr>Local<span class="tsd-signature-symbol">(</span>mute<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1976</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Whether to play locally silently.</p> </div> <p>If [enableAux] switch is turned on, there is still sound in the publishing stream. The default is false.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>mute: <span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"> <p>Mute local audio flag, The default is false.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"> <a name="off" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> off</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"> <li class="tsd-signature tsd-kind-icon">off&lt;MediaPlayerEventType&gt;<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MediaPlayerEventType</span>, callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ZegoMediaPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">MediaPlayerEventType</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2091</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Unregister the event handler of mediaplayer</p> </div> </div> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>MediaPlayerEventType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><a href="../interfaces/_zegoexpresseventhandler_.zegomediaplayerlistener.html" class="tsd-signature-type">ZegoMediaPlayerListener</a></h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">MediaPlayerEventType</span></h5> <div class="tsd-comment tsd-typography"> <p>Event type.</p> </div> </li> <li> <h5>callback: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ZegoMediaPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">MediaPlayerEventType</span><span class="tsd-signature-symbol">]</span></h5> <div class="tsd-comment tsd-typography"> <p>Call back.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"> <a name="on" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> on</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"> <li class="tsd-signature tsd-kind-icon">on&lt;MediaPlayerEventType&gt;<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MediaPlayerEventType</span>, callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ZegoMediaPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">MediaPlayerEventType</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2081</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Register the event handler of mediaplayer</p> </div> </div> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>MediaPlayerEventType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><a href="../interfaces/_zegoexpresseventhandler_.zegomediaplayerlistener.html" class="tsd-signature-type">ZegoMediaPlayerListener</a></h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">MediaPlayerEventType</span></h5> <div class="tsd-comment tsd-typography"> <p>Event type.</p> </div> </li> <li> <h5>callback: <span class="tsd-signature-type">ZegoMediaPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">MediaPlayerEventType</span><span class="tsd-signature-symbol">]</span></h5> <div class="tsd-comment tsd-typography"> <p>Call back.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="pause" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> pause</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">pause<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1929</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Pause playing.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="resume" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> resume</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">resume<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1933</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Resume playing.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="seekto" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> seek<wbr>To</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">seek<wbr>To<span class="tsd-signature-symbol">(</span>millisecond<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_zegoexpressdefines_.zegomediaplayerseektoresult.html" class="tsd-signature-type">ZegoMediaPlayerSeekToResult</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1942</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set the specified playback progress.</p> </div> <p>Unit is millisecond</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>millisecond: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>Point in time of specified playback progress</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_zegoexpressdefines_.zegomediaplayerseektoresult.html" class="tsd-signature-type">ZegoMediaPlayerSeekToResult</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>The result notification of set the specified playback progress</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="setaudiotrackindex" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Audio<wbr>Track<wbr>Index</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set<wbr>Audio<wbr>Track<wbr>Index<span class="tsd-signature-symbol">(</span>index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2058</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set the audio track of the playback file.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>index: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>Audio track index, the number of audio tracks can be obtained through the [getAudioTrackCount] function.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="setplayspeed" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Play<wbr>Speed</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set<wbr>Play<wbr>Speed<span class="tsd-signature-symbol">(</span>speed<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1960</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set the speed of play.</p> </div> <p>Available since: 2.12.0 Description: Set the playback speed of the player. When to call: You should load resource before invoking this function. Restrictions: None. Related APIs: Resources can be loaded through the [loadResource] function.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>speed: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The speed of play. The range is 0.5 ~ 4.0. The default is 1.0.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="setplayvolume" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Play<wbr>Volume</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set<wbr>Play<wbr>Volume<span class="tsd-signature-symbol">(</span>volume<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1995</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set mediaplayer local playback volume.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>volume: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The range is 0 ~ 200. The default is 60.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="setplayerview" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Player<wbr>View</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set<wbr>Player<wbr>View<span class="tsd-signature-symbol">(</span>view<span class="tsd-signature-symbol">: </span><a href="_zegoexpressdefines_.zegoview.html" class="tsd-signature-type">ZegoView</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:1983</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set the view of the player playing video. Note: This function is only available in ZegoExpressVideo SDK!</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>view: <a href="_zegoexpressdefines_.zegoview.html" class="tsd-signature-type">ZegoView</a></h5> <div class="tsd-comment tsd-typography"> <p>Video rendered canvas object</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="setprogressinterval" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Progress<wbr>Interval</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set<wbr>Progress<wbr>Interval<span class="tsd-signature-symbol">(</span>millisecond<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2010</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set playback progress callback interval.</p> </div> <p>This function can control the callback frequency of [onMediaPlayerPlayingProgress]. When the callback interval is set to 0, the callback is stopped. The default callback interval is 1s This callback are not returned exactly at the set callback interval, but rather at the frequency at which the audio or video frames are processed to determine whether the callback is needed to call</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>millisecond: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>Interval of playback progress callback in milliseconds</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="setpublishvolume" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Publish<wbr>Volume</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set<wbr>Publish<wbr>Volume<span class="tsd-signature-symbol">(</span>volume<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in ZegoExpressDefines.ts:2001</li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Set mediaplayer publish volume.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>volume: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The range is 0 ~ 200. The default is 60.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"