Difference between revisions of "Android Player Intents"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 29: Line 29:
 
* "extra_duration": media duration
 
* "extra_duration": media duration
  
You can check the source [[http://git.videolan.org/?p=vlc-ports/android.git;a=blob;f=vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java;hb=HEAD|here]]
+
You can check the source [http://git.videolan.org/?p=vlc-ports/android.git;a=blob;f=vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java;hb=HEAD here].

Revision as of 17:08, 1 June 2015

Since version 1.4.1, Android VLC application returns an intent when closing.

Here is the description of this intent:

Intent action: "org.videolan.vlc.player.result"

Result code:

Result Value (int) Description
RESULT_OK -1 Video finished or user ended playback
RESULT_CANCELED 0 No compatible cpu, incorrect VLC abi variant installed
RESULT_CONNECTION_FAILED 2 Connection failed to audio service
RESULT_PLAYBACK_ERROR 3 VLC is not able to play this file, it could be incorrect path/uri, not supported codec or broken file
RESULT_HARDWARE_ACCELERATION_ERROR 4 Error with hardware acceleration, user refused to switch to software decoding
RESULT_VIDEO_TRACK_LOST 5 VLC continues playback, but for audio track only. (Audio file detected or user chose to)

Data: media Uri

Extras:

  • "extra_position": position in the media, in ms (type long)
  • "extra_duration": media duration

You can check the source here.