Esempio n. 1
0
 /**
  * Stop the currently playing media.
  *
  * @return Whether media were playing when before the operation.
  */
 public boolean stop() {
   return mController.stop();
 }
Esempio n. 2
0
 /**
  * Seek the currently playing media to a specific position and start playback.
  *
  * @param position The position to seek to in milliseconds from the start.
  * @return Whether the operation was successful.
  */
 public boolean seek(int position) {
   return mController.seek(position);
 }
Esempio n. 3
0
 /**
  * Suspend or resume playback.
  *
  * @param state If true, pause playback. If false, resume.
  * @return whether the operation was successful.
  */
 public boolean pause(boolean state) {
   assertUIThread();
   return mController.pause(state);
 }
Esempio n. 4
0
 /**
  * Toggle playing state of a video. If playing, pauses. If paused, resumes. If idle, starts.
  *
  * @return whether the operation was successful.
  */
 public boolean pause() {
   assertUIThread();
   return mController.pause();
 }
Esempio n. 5
0
 /**
  * Start or suspend playback.
  *
  * @param state If true, start playback. If false, pause.
  * @return whether the operation was successful.
  */
 public boolean play(boolean state) {
   assertUIThread();
   return mController.play(state);
 }
Esempio n. 6
0
 /**
  * Toggle playing state of a video. If playing, pauses. If paused, resumes. If idle, starts.
  *
  * @return whether the operation was successful.
  */
 public boolean play() {
   assertUIThread();
   return mController.play();
 }
Esempio n. 7
0
 /**
  * Load media.
  *
  * @param url The URL which points to the media to be played.
  * @return Whether the preparations for loading were completed successfully. Usually, the loading
  *     itself is done asynchronously, and will result in a mediaError event.
  */
 public boolean load(String url) {
   return mController.load(url);
 }