【问题标题】:Botframework V4: How to send video attachment?Botframework V4:如何发送视频附件?
【发布时间】:2019-01-22 01:38:34
【问题描述】:

如果这看起来像一个轻松的问题,我很抱歉,但我真的无法在任何地方找到它。 docs 中也没有样本。并且互联网上没有太多关于 botframework v4 的指南。谁能给我一个视频卡或视频英雄卡或轮播形式的视频英雄卡的示例?谢谢!

【问题讨论】:

    标签: c# botframework


    【解决方案1】:

    嗨嗨!

    Bot Framework 示例存储库的 C# 部分中有一个示例,名为 "06. Using Cards"。如果您运行此示例,它将显示机器人框架可以执行的所有卡片的示例,通道允许。在示例中,您可以选择“全部显示”以查看轮播中的卡片,其中一张卡片是视频卡。

    private static VideoCard GetVideoCard()
        {
            var videoCard = new VideoCard
            {
                Title = "Big Buck Bunny",
                Subtitle = "by the Blender Institute",
                Text = "Big Buck Bunny (code-named Peach) is a short computer-animated comedy film by the Blender Institute," +
                       " part of the Blender Foundation. Like the foundation's previous film Elephants Dream," +
                       " the film was made using Blender, a free software application for animation made by the same foundation." +
                       " It was released as an open-source film under Creative Commons License Attribution 3.0.",
                Image = new ThumbnailUrl
                {
                    Url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/220px-Big_buck_bunny_poster_big.jpg",
                },
                Media = new List<MediaUrl>
                {
                    new MediaUrl()
                    {
                        Url = "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4",
                    },
                },
                Buttons = new List<CardAction>
                {
                    new CardAction()
                    {
                        Title = "Learn More",
                        Type = ActionTypes.OpenUrl,
                        Value = "https://peach.blender.org/",
                    },
                },
            };
    
            return videoCard;
        }
    

    【讨论】:

    • 非常感谢。这就是我需要的。
    猜你喜欢
    • 1970-01-01
    • 2014-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多