Configure custom Meting APIs
masterMetingJS allows you to use a self-hosted Meting API. You can configure this globally or on a per-element basis. The API selection follows this priority order:
- Element
apiattribute (highest priority) - Global
window.meting_apivariable - Built-in default API (lowest priority)
Global Configuration
Define a meting_api variable in a <script> tag before loading Meting.min.js.
Per-Element Configuration
Use the api attribute directly on the <meting-js> tag.
<!-- Global Configuration -->
<script>
var meting_api='http://example.com/api.php?server=:server&type=:type&id=:id&auth=:auth&r=:r';
</script>
<script src="dist/Meting.min.js"></script>
<!-- Per-Element Configuration -->
<meting-js
server="netease"
type="song"
id="28391863"
api="https://your-custom-api.com/meting?server=:server&type=:type&id=:id&r=:r">
</meting-js>