Vimu Player API

Application developers are welcome to use Vimu Player as a playback engine.

Intent Extras

3rd party streaming apps can control some Vimu properties over intent extras like intent.putExtra(key, value). Here are some keys:

"forcename"String

The string will be displayed on the infobar as the name of the content.

"forcedsrt"String

URL of a subtitle (SRT) file to be attached to the video.

"startfrom"int

Player will seek to provided timestamp (in msecs) at playback start (if file's format is seekable).

"forceresume"boolean

Enable resume playback feature for current URL.

Activity Result

App can be started with startActivityForResult to get info back from the app.

Newer versions pass Intent action: "net.gtvbox.videoplayer.result"

Result codes:

1 — playback completed (to the end)
0 — playback was interrupted. In that case interrupt "position" integer and total "duration" integer will be returned in the intent data.
4 — playback failed with a error

Playlist Support

It's possible to upload a playlist over intent. Example:

Intent vpIntent = new Intent(Intent.ACTION_VIEW);
vpIntent.setDataAndType("http://fakeurl", "application/vnd.gtvbox.filelist");

ArrayList<String> names = new ArrayList<String>(); ArrayList<String> files = new ArrayList<String>();

names.add(“Name1”); files.add(“http://url1”);

names.add(“Name2”); files.add(“http://url2”);

vpIntent.putStringArrayListExtra(“asusfilelist”, files); vpIntent.putStringArrayListExtra(“asusnamelist”, names);

Playlist can be with startActivityForResult to get info back from the app. Result codes are the same. In case of interrupt, "url" of interrupted file in playlist and "position" will be returned.

Support

For API support and questions, please contact us:

vimu@gtvbox.net

You can also visit our support page:

→ Contact Support