Fix: Crash on HTML response in EventRepository and others
- Fixed: Value <! DOCTYPE cannot be converted to JSONArray in EventRepository - Fixed: Added HTML validation in UpdateManager and DeviceRegistry - Fixed: Improved HTTP error handling in StreamUrlResolver - Improved: Error messages in PlayerActivity - Bumped version to 9.4.3
This commit is contained in:
@@ -22,6 +22,7 @@ import com.google.android.exoplayer2.source.hls.HlsMediaSource;
|
||||
import com.google.android.exoplayer2.ui.PlayerView;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.HashMap;
|
||||
@@ -100,8 +101,10 @@ public class PlayerActivity extends AppCompatActivity {
|
||||
try {
|
||||
String resolvedUrl = StreamUrlResolver.resolve(channelUrl);
|
||||
runOnUiThread(() -> startPlayback(resolvedUrl));
|
||||
} catch (IOException e) {
|
||||
runOnUiThread(() -> showError("No se pudo conectar con el canal: " + e.getMessage()));
|
||||
} catch (Exception e) {
|
||||
runOnUiThread(() -> showError("Error al obtener stream: " + e.getMessage()));
|
||||
runOnUiThread(() -> showError("Error inesperado: " + e.getMessage()));
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user