示例#1
0
        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()));

        }