Commit 1aeaaa077a2abb9e4df8c45ba42fb5889bed3fca

Authored by Imanol-Mikel Barba Sabariego
1 parent 90a952d3

--no commit message

src/com/upc/pbe/upcnews/Directoris.java
... ... @@ -122,7 +122,8 @@ public class Directoris extends Activity implements OnClickListener {
122 122 try {
123 123 ArrayList<ParentList> m3u8parsed = p.parseFile(m3u8);
124 124 Log.d(TAG, "parsed completed");
125   -
  125 + HLS h = new HLS(m3u8parsed);
  126 + h.start();
126 127  
127 128 } catch (ErrorException e) {
128 129 Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
... ... @@ -134,8 +135,11 @@ public class Directoris extends Activity implements OnClickListener {
134 135 Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
135 136 Log.d(TAG, e.getMessage());
136 137 }
  138 +
137 139 }
138 140  
  141 +
  142 +
139 143 //VideoPlayer
140 144 /*
141 145 String urlvid = null;
... ...
src/com/upc/pbe/upcnews/HLS.java 0 → 100644
  1 +package com.upc.pbe.upcnews;
  2 +
  3 +import java.util.ArrayList;
  4 +
  5 +public class HLS {
  6 +
  7 + static final String TAG = "HLS";
  8 +
  9 + ArrayList<ParentList> ppls;
  10 + int numvideo;
  11 + int quality; //0 és la més alta
  12 +
  13 + public HLS(ArrayList<ParentList> parsed)
  14 + {
  15 + this.ppls = parsed;
  16 + numvideo = 0;
  17 + quality = 0;
  18 + }
  19 +
  20 + public void start(){
  21 +
  22 + //Primer vídeo que hi hagi, amb la millor qualitat possible
  23 + for(int i = 0 ; i < ppls.get(numvideo).getLists().get(quality).getSegments().size() ; i++){
  24 +
  25 + }
  26 + }
  27 +
  28 +}
... ...