use of de.danoeh.antennapod.core.util.playback.Playable in project AntennaPod by AntennaPod.
the class TimelineTest method testProcessShownotesAddTimecodeHHMMNoChapters.
public void testProcessShownotesAddTimecodeHHMMNoChapters() throws Exception {
final String timeStr = "10:11";
final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
Playable p = newTestPlayable(null, "<p> Some test text with a timecode " + timeStr + " here.</p>");
Timeline t = new Timeline(context, p);
String res = t.processShownotes(true);
checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
use of de.danoeh.antennapod.core.util.playback.Playable in project AntennaPod by AntennaPod.
the class TimelineTest method testProcessShownotesAddTimecodeAngleBrackets.
public void testProcessShownotesAddTimecodeAngleBrackets() throws Exception {
final String timeStr = "10:11";
final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
Playable p = newTestPlayable(null, "<p> Some test text with a timecode <" + timeStr + "> here.</p>");
Timeline t = new Timeline(context, p);
String res = t.processShownotes(true);
checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
use of de.danoeh.antennapod.core.util.playback.Playable in project AntennaPod by AntennaPod.
the class TimelineTest method testProcessShownotesAddTimecodeBrackets.
public void testProcessShownotesAddTimecodeBrackets() throws Exception {
final String timeStr = "10:11";
final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
Playable p = newTestPlayable(null, "<p> Some test text with a timecode [" + timeStr + "] here.</p>");
Timeline t = new Timeline(context, p);
String res = t.processShownotes(true);
checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
use of de.danoeh.antennapod.core.util.playback.Playable in project AntennaPod by AntennaPod.
the class TimelineTest method testProcessShownotesAddTimecodeParentheses.
public void testProcessShownotesAddTimecodeParentheses() throws Exception {
final String timeStr = "10:11";
final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
Playable p = newTestPlayable(null, "<p> Some test text with a timecode (" + timeStr + ") here.</p>");
Timeline t = new Timeline(context, p);
String res = t.processShownotes(true);
checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
use of de.danoeh.antennapod.core.util.playback.Playable in project AntennaPod by AntennaPod.
the class ExternalPlayerFragment method loadMediaInfo.
private boolean loadMediaInfo() {
Log.d(TAG, "Loading media info");
if (controller != null && controller.serviceAvailable()) {
Playable media = controller.getMedia();
if (media != null) {
txtvTitle.setText(media.getEpisodeTitle());
mFeedName.setText(media.getFeedTitle());
mProgressBar.setProgress((int) ((double) controller.getPosition() / controller.getDuration() * 100));
Glide.with(getActivity()).load(media.getImageLocation()).placeholder(R.color.light_gray).error(R.color.light_gray).diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY).fitCenter().dontAnimate().into(imgvCover);
fragmentLayout.setVisibility(View.VISIBLE);
if (controller.isPlayingVideoLocally()) {
butPlay.setVisibility(View.GONE);
} else {
butPlay.setVisibility(View.VISIBLE);
}
return true;
} else {
Log.w(TAG, "loadMediaInfo was called while the media object of playbackService was null!");
return false;
}
} else {
Log.w(TAG, "loadMediaInfo was called while playbackService was null!");
return false;
}
}
Aggregations