From 089e41b8b07b11486fbfe9b9e4e114c54a15284e Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Mon, 10 Dec 2012 14:13:14 +0000 Subject: [PATCH] Gitanada xddd --- src/com/upc/pbe/upcnews/HLS.java | 10 ++++++++-- src/com/upc/pbe/upcnews/VideoActivity.java | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com/upc/pbe/upcnews/HLS.java b/src/com/upc/pbe/upcnews/HLS.java index b9a14c2..d1e5ef3 100644 --- a/src/com/upc/pbe/upcnews/HLS.java +++ b/src/com/upc/pbe/upcnews/HLS.java @@ -7,7 +7,8 @@ import android.net.TrafficStats; import android.util.Log; //Gestor del protocol HTTP Live Streaming -public class HLS extends UpcApp{ +public class HLS +{ private static final String TAG = "HLS"; private ArrayList videos; @@ -31,7 +32,7 @@ public class HLS extends UpcApp{ deleteme.delete(); } - currentQuality = this.getQuality(); + currentQuality = 0; currentVideo = currentQuality = currentSegment = 0; this.videos = parsed; endReached = false; @@ -69,4 +70,9 @@ public class HLS extends UpcApp{ } return localFolder + seg.getURL().substring(seg.getURL().lastIndexOf("/")+1, seg.getURL().length()); } + + public void setDefQuality(int q) + { + currentQuality = q; + } } \ No newline at end of file diff --git a/src/com/upc/pbe/upcnews/VideoActivity.java b/src/com/upc/pbe/upcnews/VideoActivity.java index e9d52a7..3331b0f 100644 --- a/src/com/upc/pbe/upcnews/VideoActivity.java +++ b/src/com/upc/pbe/upcnews/VideoActivity.java @@ -34,6 +34,7 @@ public class VideoActivity extends Activity { }); //Creem un gestor HLS, carreguem el video i iniciem la reproduccio h = ((UpcApp)getApplication()).getHLS(); + h.setDefQuality(((UpcApp)getApplication()).getQuality()); h.loadVideo(); playNext(); } -- libgit2 0.22.2