मैं विंडोज फोन 7 ऐप में रेडियो स्ट्रीम करने की कोशिश कर रहा हूं और इसके लिए मैं ManagedMediaHelpers
का उपयोग कर रहा हूं। निरंतर स्ट्रीम काम करने के लिए HttpWebRequest
लेकिन निरंतर स्ट्रीम की वजह से कॉलबैक यूआरएल को कॉल नहीं करता है।एक्सेस स्ट्रीम बफर HttpWebRequest
मैं कॉलबैक यूआरएल की सहायता के बिना स्ट्रीम तक कैसे पहुंचूं? अन्य पदों पर कुछ ने कहा कि हे प्रतिबिंब का उपयोग करने की आवश्यकता है, लेकिन क्या कोई इसे लागू करने के लिए गर्म जानता है? यहाँ मेरी कोड है: - सुनिश्चित करें कि यदि आप चलाने बनाने
Getting bytes from continuous streams on Windows Phone 7
यह भी अपने यूआरएल के साथ एक समस्या हो सकती है:
req = (HttpWebRequest) WebRequest.Create(
"http://streamer-dtc-aa01.somafm.com:80/stream/1018");
// if this is false it will fire up the callback Url
// but the mediastreamsource will throw an exception
// saying the it needs to be true
req.AllowReadStreamBuffering = true;
IAsyncResult result = req.BeginGetResponse(RequestComplete,null);
private void RequestComplete(IAsyncResult r)
{
HttpWebResponse resp = req.EndGetResponse(r) as HttpWebResponse;
Stream str = resp.GetResponseStream();
mss = new Mp3MediaStreamSource(str, resp.ContentLength);
Deployment.Current.Dispatcher.BeginInvoke(() => {
this.me.Volume = 100;
this.me.SetSource(mss);
});
}
लाइव रेडियो स्ट्रीम की सामग्री लम्बाई क्या है? – AnthonyWJones
सहमत! डीबग से मैंने देखा कि मूल्य -1 था ... तो कोई विचार या टिप्स? उत्तर के लिए धन्यवाद! –