Commit 50c012ead365de1a5475bdc125d4407e92915b69

Authored by Imanol-Mikel Barba Sabariego
1 parent cb06119f

Bug de HLS y al girar la actividad Directoris fixed

AndroidManifest.xml
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 </activity> 30 </activity>
31 <activity android:name=".Help" android:configChanges="orientation"> 31 <activity android:name=".Help" android:configChanges="orientation">
32 </activity> 32 </activity>
33 - <activity android:name=".Directoris" > 33 + <activity android:name=".Directoris" android:configChanges="orientation">
34 </activity> 34 </activity>
35 <activity android:name=".VideoActivity" android:theme="@style/FullScreen" android:configChanges="orientation"> 35 <activity android:name=".VideoActivity" android:theme="@style/FullScreen" android:configChanges="orientation">
36 </activity> 36 </activity>
src/com/upc/pbe/upcnews/Directoris.java
@@ -7,6 +7,7 @@ import java.util.concurrent.ExecutionException; @@ -7,6 +7,7 @@ import java.util.concurrent.ExecutionException;
7 7
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.Intent; 9 import android.content.Intent;
  10 +import android.content.res.Configuration;
10 import android.os.Bundle; 11 import android.os.Bundle;
11 import android.util.Log; 12 import android.util.Log;
12 import android.view.KeyEvent; 13 import android.view.KeyEvent;
@@ -202,4 +203,8 @@ public class Directoris extends Activity implements OnItemClickListener @@ -202,4 +203,8 @@ public class Directoris extends Activity implements OnItemClickListener
202 return false; 203 return false;
203 } 204 }
204 } 205 }
  206 + @Override
  207 + public void onConfigurationChanged(Configuration newConfig) {
  208 + super.onConfigurationChanged(newConfig);
  209 + }
205 } 210 }
206 \ No newline at end of file 211 \ No newline at end of file
src/com/upc/pbe/upcnews/HLS.java
@@ -56,6 +56,8 @@ public class HLS @@ -56,6 +56,8 @@ public class HLS
56 { 56 {
57 return null; 57 return null;
58 } 58 }
  59 + currentQuality = 0;
  60 + currentSegment = 0;
59 loadVideo(); 61 loadVideo();
60 } 62 }
61 Segment seg = segments.get(currentSegment++); 63 Segment seg = segments.get(currentSegment++);