Exemplo n.º 1
0
        // GET: /Music/PlayListenAgain
        public ContentResult PlayListenAgain(
            string pid)
        {
            string   name;
            string   station;
            DateTime startTime;
            string   streamUrl = BBC.GetStreamUrl(pid, out name, out station, out startTime);

            JRMC.SetStreaming(name, station, startTime);
            JRMC.GetXml(JRMC.Url + "Control/CommandLine?Arguments=/Play " + HttpUtility.UrlEncode(streamUrl));
            return(this.Content(""));
        }
Exemplo n.º 2
0
        // GET: /Music/SendMCWS
        public ContentResult SendMCWS(
            string url)
        {
            if (url.StartsWith("Playback/PlayByKey?"))
            {
                JRMC.ClearStreaming();
            }

            //  Can't seek streamed radio
            if (url.StartsWith("Playback/Position?") && JRMC.IsStreaming())
            {
                return(this.Content(""));
            }

            XDocument doc = JRMC.GetXml(JRMC.Url + url);

            return(this.Content(doc.ToString(), @"text/xml"));
        }