Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

VideoCardScorable.cs 2.1 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  1. namespace TestBot.Scorables
  2. {
  3. using System.Collections.Generic;
  4. using Microsoft.Bot.Builder.Dialogs.Internals;
  5. using Microsoft.Bot.Connector;
  6. public class VideoCardScorable : RichCardScorable
  7. {
  8. public VideoCardScorable(IBotToUser botToUser, IBotData botData) : base(botToUser, botData)
  9. {
  10. }
  11. public override string Trigger
  12. {
  13. get
  14. {
  15. return "Video";
  16. }
  17. }
  18. protected override IList<Attachment> GetCardAttachments()
  19. {
  20. return new List<Attachment>
  21. {
  22. new VideoCard
  23. {
  24. Title = "Big Buck Bunny",
  25. Subtitle = "by the Blender Institute",
  26. 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.",
  27. Image = new ThumbnailUrl
  28. {
  29. Url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/220px-Big_buck_bunny_poster_big.jpg"
  30. },
  31. Media = new List<MediaUrl>
  32. {
  33. new MediaUrl()
  34. {
  35. Url = "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4"
  36. }
  37. },
  38. Buttons = new List<CardAction>
  39. {
  40. new CardAction()
  41. {
  42. Title = "Learn More",
  43. Type = ActionTypes.OpenUrl,
  44. Value = "https://peach.blender.org/"
  45. }
  46. }
  47. }.ToAttachment()
  48. };
  49. }
  50. }
  51. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...