thyagoluciano / flutter_radio

Radio station streaming example with ExoPlayer and Flutter.
GNU General Public License v3.0
86 stars 41 forks source link

Support For ICY metadata #17

Open eznix86 opened 5 years ago

eznix86 commented 5 years ago

For a radio plugin, I guess it should supports Shoutcast (ICY) metadata right ?

tameralgul commented 4 years ago

any solution ?

alainseys commented 4 years ago

maby try to get it by javascript ? icecast and shoutcast are give xmls with the audio info

https://api.flutter.dev/flutter/dart-js/dart-js-library.html

eznix86 commented 4 years ago

In Exoplayer, we can use:

import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.metadata.MetadataOutput;

When implementing MetadataOutput on RadioService, we get this:.

    @Override
    public void onMetadata(Metadata metadata) {
      // ex, we get icy metadata with:  metadata.get(0).toString()
    }

thus having information on the icy metadata

tameralgul commented 4 years ago

@theArtechnology thank you for reply.

actually i don't know how to implement it.

in addition i need to implement it for IOS :( . did you have any idea ? . and with detailing please

eznix86 commented 4 years ago

Actually, you don't need to implement it, I was just hoping that they would add this feature in the plugin itself.

Unfortunately, I can't help you on the iOS side. (As I don't own a mac :disappointed: )

alainseys commented 4 years ago

i have a work a round for this in my flutter project i call a php script(on a remote server) that outputs the string of the title (you can also call other data from the icy stream) that way i parse the info that is returned to my flutter application.

so the title you see in the bottom of the application is called from php, that works for me

Schermafbeelding 2020-09-30 om 17 01 06
tameralgul commented 4 years ago

Actually, you don't need to implement it, I was just hoping that they would add this feature in the plugin itself.

Unfortunately, I can't help you on the iOS side. (As I don't own a mac 😞 )

Don't worry. any way thank you for reply :)

tameralgul commented 4 years ago

i have a work a round for this in my flutter project i call a php script(on a remote server) that outputs the string of the title (you can also call other data from the icy stream) that way i parse the info that is returned to my flutter application.

so the title you see in the bottom of the application is called from php, that works for me

Schermafbeelding 2020-09-30 om 17 01 06

I try to get them from Shoutcast profile page where them already appears. but connection always closed while receiving data, i think this page is not use simple HTTP protocol. otherwise my customer don't have a back end application on web.

May i will not to showing metas in this app

alainseys commented 4 years ago

i have a work a round for this in my flutter project i call a php script(on a remote server) that outputs the string of the title (you can also call other data from the icy stream) that way i parse the info that is returned to my flutter application. so the title you see in the bottom of the application is called from php, that works for me

Schermafbeelding 2020-09-30 om 17 01 06

I try to get them from Shoutcast profile page where them already appears. but connection always closed while receiving data, i think this page is not use simple HTTP protocol. otherwise my customer don't have a back end application on web.

May i will not to showing metas in this app

Hy i keep the connection open until the user presses the stop button. Our icecast trafic is passed trough a ssl proxy (not that it makes any difference). The simplest method is parsing the xspf file , dont know about shoutcast but the basics should be the same.