Ejemplo n.º 1
0
 /** Seek to the given playback position (in ms) */
 @Override
 public void seekTo(int msec) throws IllegalStateException {
   Log.d(TAG, "seekTo()");
   if (mLibVLC != null
       && mPreparedQuery != null
       && !PipeLine.PLUGINNAME_BEATSMUSIC.equals(
           mPreparedQuery.getPreferredTrackResult().getResolvedBy().getId())) {
     mLibVLC.setTime(msec);
   }
 }
Ejemplo n.º 2
0
 /** Prepare the given url */
 private MediaPlayerInterface prepare(Query query) {
   mPreparedQuery = null;
   mPreparingQuery = query;
   release();
   if (mLibVLC == null) {
     return null;
   }
   Result result = query.getPreferredTrackResult();
   if (PipeLine.PLUGINNAME_BEATSMUSIC.equals(result.getResolvedBy().getId())
       || PipeLine.PLUGINNAME_GMUSIC.equals(result.getResolvedBy().getId())) {
     if (mTranslatedUrls.get(result) == null) {
       ((ScriptResolver) result.getResolvedBy()).getStreamUrl(result);
     } else {
       mLibVLC.playMRL(LibVLC.PathToURI(mTranslatedUrls.get(result)));
       onPrepared(null);
     }
   } else {
     mLibVLC.playMRL(LibVLC.PathToURI(result.getPath()));
     onPrepared(null);
   }
   return this;
 }