使用微软BotFramework在电报中寻求显示videocard / youtubevideo的build议
我的目标是在电报中显示YouTubevideo(最好是以卡的forms),同时尽可能使用botbuilder模块将我的代码保持为“通道不可知”。
谁能告诉我为什么Telegram使用从官方示例回购 (createVideoCard()示例)采取的这个NodeJS示例将video显示为一个普通图像? (youtube链接的行为相同)。
var builder = require('botbuilder'); function (session, results, next) { const msg = new builder.Message(session) .addAttachment(new builder.VideoCard(session) .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(builder.CardImage.create(session, 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/220px-Big_buck_bunny_poster_big.jpg')) .media([{ url: 'http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4' }]) .buttons([builder.CardAction.openUrl(session, 'https://peach.blender.org/', 'Learn More')]); session.send(msg); }
而使用:
session.send('youtube link');
被Telegram识别并呈现为youtubevideo。
我已阅读以下richcard支持 :
本示例中使用的animation卡,video卡和audio卡在以下通道中得到完全支持:
Skype的Facebook WebChat
在下列频道中,它们也受到一些限制的支持:
Slack(仅支持animation卡)GroupMe电报(仅支持animation和声卡)电子邮件
我怎样才能最好地实现我的目标?
- 通过在Microsoft Bot Framework中循环文件来dynamic创build卡片
- Bot仿真器连接到另一台机器上的Node.js服务
- 什么可能会阻止EC2托pipe的机器人在Microsoft Bot Framework上回复消息?
- Microsoft Bot框架:发送连接消息
- 如何在bot框架中validation电话号码?
- 在Facebook Messenger上使用Bing Speech Recognition API和node.js Bot Framework
- 如何使Node.js上的MS Bot Framework等待用户的下一个消息?
- 如何更改Bot / Skype通道收到的消息文本格式
- 在QnAMakerRecognizer中使用onEnabled方法