-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi,
I made few tweakes to the code and try running it using an URL but nothing really happened.
Inisde M3UParser.java :
public void parse(String filename, M3UHandler handler) {
if (handler == null) { // No need do anything, if no handler.
return;
}
try {
/*BufferedReader br = new BufferedReader(new InputStreamReader(
new FileInputStream(filename)));*/
URL urls = new URL(filename);
BufferedReader in = new BufferedReader(new InputStreamReader(urls
.openStream()));
String tmp = null;
while ((tmp = shrink(in.readLine())) != null) {
if (tmp.startsWith(PREFIX_EXTM3U)) {
handler.onReadEXTM3U(parseHead(shrink(tmp.replaceFirst(
PREFIX_EXTM3U, EMPTY_STRING))));
} else if (tmp.startsWith(PREFIX_EXTINF)) {
// The old item must be committed when we meet a new item.
flush(handler);
mTempItem = parseItem(shrink(tmp.replaceFirst(
PREFIX_EXTINF, EMPTY_STRING)));
} else if (tmp.startsWith(PREFIX_COMMENT)) {
// Do nothing.
} else if (tmp.equals(EMPTY_STRING)) {
// Do nothing.
} else { // The single line is treated as the stream URL.
updateURL(tmp);
}
}
flush(handler);
in.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
and in Player.java :
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initViews();
prepareData(DEFAULT_PATH);
}
DEFAULT_PATH being the URL i want to run.
When i run the code this is what i see on logs:
2019-07-29 11:59:59.195 8556-8556/? I/com.iptv.playe: Late-enabling -Xcheck:jni
2019-07-29 11:59:59.344 8556-8556/com.iptv.player W/com.iptv.playe: JIT profile information will not be recorded: profile file does not exits.
2019-07-29 11:59:59.346 8556-8556/com.iptv.player I/chatty: uid=10131(com.iptv.player) identical 10 lines
2019-07-29 11:59:59.346 8556-8556/com.iptv.player W/com.iptv.playe: JIT profile information will not be recorded: profile file does not exits.
2019-07-29 11:59:59.360 8556-8556/com.iptv.player I/Perf: Connecting to perf service.
2019-07-29 11:59:59.375 8556-8556/com.iptv.player I/InstantRun: starting instant run server: is main process
2019-07-29 11:59:59.436 8556-8556/com.iptv.player D/OpenGLRenderer: Skia GL Pipeline
2019-07-29 11:59:59.556 8556-8589/com.iptv.player D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2019-07-29 11:59:59.557 8556-8589/com.iptv.player I/DpmTcmClient: RegisterTcmMonitor from: com.android.okhttp.TcmIdleTimerMonitor
2019-07-29 11:59:59.576 8556-8588/com.iptv.player I/Adreno: QUALCOMM build : cf57c9c, I1cb5c4d1cc
Build Date : 09/23/18
OpenGL ES Shader Compiler Version: EV031.25.03.01
Local Branch :
Remote Branch :
Remote Branch :
Reconstruct Branch :
2019-07-29 11:59:59.576 8556-8588/com.iptv.player I/Adreno: Build Config : S L 6.0.7 AArch64
2019-07-29 11:59:59.579 8556-8588/com.iptv.player I/Adreno: PFP: 0x005ff112, ME: 0x005ff066
2019-07-29 11:59:59.583 8556-8588/com.iptv.player I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2019-07-29 11:59:59.583 8556-8588/com.iptv.player I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2019-07-29 11:59:59.584 8556-8588/com.iptv.player I/OpenGLRenderer: Initialized EGL, version 1.4
2019-07-29 11:59:59.584 8556-8588/com.iptv.player D/OpenGLRenderer: Swap behavior 2
2019-07-29 12:00:02.194 8556-8589/com.iptv.player D/M3U: Load [https://somewebsite.com/api/listen?sid=xxxxx&rid=x&f=mp3,any&br=64000,any&m=m3u]
2019-07-29 12:0xxxxx0:02.xxx xxxx-xxxx/com.iptv.player D/M3U: [Head]
[Item]
Channel Name: http://18XXX.live.streamurlname.com:xx/ABCDEFG_SC
Duration: -1
Stream URL:
[Item]
Channel Name: http://14XXX.live.streamurlname.com:xx/ABCDEFG_SC
Duration: -1
Stream URL:
Please help !.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels