Closed alainseys closed 3 years ago
@thyagoluciano is it possible?
@sarbazx i have done this by calling a php api where i get the stream information. the server is using a icecast2 server
this is de code of php api
function
CallIcecastXSPF($XSPFurl){
//$XSPFurl = 'http://127.0.0.18000/stream_192.xspf';
$xml = simplexml_load_file($XSPFurl);
$stream['info']['title'] = (string) $xml->trackList->track->title;
$stream['info']['location'] = (string) $xml->trackList->track->location;
$stream['info']['server_description'] = (string) $xml->trackList->track->annotation;
`preg_match_all('/^(.*):(.*)/m',` (string) $xml->trackList->track->annotation,$matches);
if(isset($matches[1]) && isset($matches[2]) && isset($matches[3])){
$t = array_combine($matches[1], $matches[2], $matches[3]);
foreach($t as $key => $val){
$fkey = str_replace(" ", "_",$key);
$stream['info'][strtolower($fkey)] = trim($val);
}
}
return $stream;
} `
Hello can i get radio stream information from to the flutter application using this ?
if so can you tell me what do i need to implement to perform this (the radio stream haves the information in the xml metadata)
thanks