For the complete documentation index, see llms.txt. This page is also available as Markdown.

Media Player

Custom Media Player AdOn Controls

You'll need to import the javascript file in your website before starting from this link.

Functions required to have a media player like notification and control it in Android and iOS devices.

Start Media

To start the media with controls call the function.

window.WTN.MediaPlayer.playMedia({
    url:"Your Media URL",
    imageUrl:"Custom Image that should be shown in the notifcation"
})
import { playMedia } from "webtonative/MediaPlayer";

playMedia({
    url:"Your Media URL",
    imageUrl:"Custom Image that should be shown in the notifcation"
})

image (optional) : It's an optional parameter to show the image in notification else default image will be shown.

Pause Media

window.WTN.MediaPlayer.pauseMedia();
import { pauseMedia } from "webtonative/MediaPlayer";

pauseMedia();

Stop Media

window.WTN.MediaPlayer.stopMedia();
import { stopMedia } from "webtonative/MediaPlayer";

stopMedia();

*Feature for Android was taken live on 26/09/2023 *Feature for iOS was taken live on 18/06/2025

Last updated