locked
Is Any sample for Audio Control using xamarin forms. RRS feed

  • Question

  • User368237 posted

    What i am try to doing when i am Getting Audio file which is stream one and I retrieve From DataBase Then i convert to Stream then i want to play the Audio.

    Here i am using stream for Image But for Audio What should I do. Guys if u have the solution for this please let me Know.

                Stream ImageStream = _mediaFile.GetStream();
    
                    var Pathfile = _mediaFile.Path;
    
                    string token = (string)Application.Current.Properties["Token"];
    
                    bool ImageResult = await imageService.GetImage(ImageStream, token, Pathfile);
    
                    if (ImageResult == true)
                    {
                        profileimage.Source = ImageSource.FromStream(() =>
                        {
                            return _mediaFile.GetStream();
                        });
                     }
    
    Wednesday, March 20, 2019 6:42 AM

Answers

  • User369979 posted

    This post has a detailed answer discussing how to play audio on Xamarin.Foms using dependency service: https://forums.xamarin.com/discussion/42008/audio-streaming-on-ios-and-android

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 21, 2019 8:30 AM

All replies

  • User369979 posted

    This post has a detailed answer discussing how to play audio on Xamarin.Foms using dependency service: https://forums.xamarin.com/discussion/42008/audio-streaming-on-ios-and-android

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 21, 2019 8:30 AM
  • User89714 posted

    @LandLu said: This post has a detailed answer discussing how to play audio on Xamarin.Foms using dependency service: https://forums.xamarin.com/discussion/42008/audio-streaming-on-ios-and-android

    Detailed, but lacking UWP ;-)

    Thursday, March 21, 2019 11:41 AM