Playing .f4m and .flv on android, audio only

1

I'm trying to play the previously mentioned file formats on android using iceplayer. I'm already using that player to play mp3 audio streams, and it works fine. For some reason it's not working with the other ones.

I'm not sure where to go from here ; if it's working for mp3, why is it not working for the other ones? From my understanding, as long as I get the file, the OS does the magic. What am I doing wrong ?

If I'm trying to play the file, nothing really happens (it just hangs but the app is still responsive)

If I try to run this on the stream url, I get a Java.lang.RuntimeException with the following message setDataSource failed: status = 0x80000000 Which is not incredibly helpful.

            //Get Duration from Stream

            MediaMetadataRetriever mmr = new MediaMetadataRetriever();
            await mmr.SetDataSourceAsync(streamUrl, new Dictionary<string, string>()); //crashes here

            var result = mmr.ExtractMetadata(MetadataKey.Duration);
            int millisecondDuration = int.Parse(result);
            int duration = millisecondDuration / 1000;

            return duration;

I do need to get the stream duration for various reasons, but I feel like this bit here is irrelevant to the problem, it's just a consequence of the initial "file not being read" issue.

android
audio
stream
file-format
asked on Stack Overflow Aug 20, 2018 by Gil Sand

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0