[UWP] [C#] UWP中的流媒体 [英] [UWP][C#]Stream Media in UWP

查看:204
本文介绍了[UWP] [C#] UWP中的流媒体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个UWP应用程序,需要在下载时播放媒体 - 媒体不完整。



我尝试使用下面的代码,但它首先下载了音频然后播放音频..
$


            string audioURL =" http://docs.google.com/uc?export = download& id = 0B6u8YFm5Y0GeLXRtd2Z6X0RjNTA" ;;

             myMedia = new MediaPlayer();

            myMedia.Source = MediaSource.CreateFromUri(new Uri(audioURL));

            myMedia.RealTimePlayback = true;

            myMedia.Play();
$


我们将非常感谢任何指导?谢谢你

解决方案

你好


mp3文件和mp3流之间有区别


你想要的是一个mp3流,但你的音频网址只提供一个mp3文件


br

Andre


I'm creating a UWP app that needs to play media while downloading - the media is not complete.

I tried using below code but it first downloads the audio then plays the audio..

            string audioURL = "http://docs.google.com/uc?export=download&id=0B6u8YFm5Y0GeLXRtd2Z6X0RjNTA";
            myMedia = new MediaPlayer();
            myMedia.Source = MediaSource.CreateFromUri(new Uri(audioURL));
            myMedia.RealTimePlayback = true;
            myMedia.Play();

Any guidance would be greatly appreciated? Thanks

解决方案

hello

there is a difference between mp3 file and mp3 stream

what you want is a mp3 stream but your audio URL only provides a mp3 file

br
Andre


这篇关于[UWP] [C#] UWP中的流媒体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆