예제 #1
0
  private void playStream(LinkedHashMap<String, String> result) {
    String q = LiveMethods.getQualityKey(getActivity(), result);
    //        final String qualities[] = result.keySet().toArray(new String[result.size()]);
    VideoPlayback p = new VideoPlayback(getActivity());

    if (q.contains("showDialog")) {
      int selQualtity = Integer.parseInt(q.substring(q.length() - 1));
      p.showPlayDialog(result, selQualtity);
    } else {
      new VideoPlayback(getActivity()).playStream(result.get(q));
    }
  }
예제 #2
0
  private void playStream(LinkedHashMap<String, String> result) {
    if (result == null) return;
    if (result.isEmpty()) {
      Toast.makeText(
              getActivity(),
              "Could not load the vod. Maybe you need to subscribe to the channel.",
              Toast.LENGTH_LONG)
          .show();
      return;
    }

    String q = LiveMethods.getQualityKey(getActivity(), result);
    //        final String qualities[] = result.keySet().toArray(new String[result.size()]);
    VideoPlayback p = new VideoPlayback(getActivity());

    if (q.contains("showDialog")) {
      int selQualtity = Integer.parseInt(q.substring(q.length() - 1));
      p.showPlayDialog(result, selQualtity);
    } else {
      new VideoPlayback(getActivity()).playStream(result.get(q));
    }
  }