Пример #1
0
 /**
  * Stop the currently playing media.
  *
  * @return Whether media were playing when before the operation.
  */
 public boolean stop() {
   return mController.stop();
 }
Пример #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);
 }
Пример #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);
 }
Пример #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();
 }
Пример #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);
 }
Пример #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();
 }
Пример #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);
 }