예제 #1
0
파일: Form1.cs 프로젝트: jeremychild/NCast
        private void button1_Click(object sender, EventArgs e)
        {
             string url = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";
            //string url = "http://192.168.0.100/live/vp8/0/0/blub.webm";

            var currentStatus = this.CurrentStatus.status.Applications.FirstOrDefault((t) => t.AppId == CurrentApp.AppId);

             var images = new List<string>();
            images.Add("http://upload.wikimedia.org/wikipedia/commons/c/c5/Big_buck_bunny_poster_big.jpg");

            var metadata = new GenericMetadata("BigBuck bunny", "Peach Open Movie Project", images);
            
            var req = new LoadRequest(currentStatus.SessionId, new Media(url, "video/mp4", metadata), true, 0.0);
            Trace.WriteLine(req.ToJson());
            CurrentAggregate.Client.Write(MessageFactory.Load(currentStatus.TransportId, req.ToJson()));

        }
예제 #2
0
파일: Form1.cs 프로젝트: 4nd413/NCast
        private void button1_Click(object sender, EventArgs e)
        {
             string url = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";
            //string url = "http://192.168.0.100/live/vp8/0/0/blub.webm";

            var currentStatus = this.CurrentStatus.status.Applications.FirstOrDefault((t) => t.AppId == CurrentApp.AppId);

            var customData = new Dictionary<string, string>();
            customData.Add("title:", "BigBuckbunny");
            customData.Add("thumb", null);
            
            var req = new LoadRequest(currentStatus.SessionId, new Media(url, null), true, 0.0, customData);
            Trace.WriteLine(req.ToJson());
            CurrentAggregate.Client.Write(MessageFactory.Load(currentStatus.TransportId, req.ToJson()));

        }