コード例 #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
ファイル: VideoFragment.java プロジェクト: PJakcson/Ace
  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));
    }
  }