很抱歉,这看起来像是一个轻松的问题,但我真的在任何地方都找不到。 docs中也没有示例。互联网上关于botframework v4的指南也很少。有人可以给我提供视频卡或视频英雄卡或轮播形式的视频英雄卡的示例吗?谢谢!
答案 0 :(得分:0)
嗨!
Bot Framework示例存储库的C#部分中有一个示例名为"06. Using Cards"。如果您运行此示例,它将显示在通道允许的情况下bot框架可以执行的所有卡的示例。在示例中,您可以选择“全部显示”以查看轮播中的卡片,其中一张卡片是视频卡。
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;
}