如何设计YouTube直播消息?

发布于 2025-02-07 13:27:51 字数 1030 浏览 2 评论 0原文

嗨,所以我使用节点JS Googleapis/YouTube软件包手动插入直播流中。该消息显示为纯文本消息,我想知道的是如何更改此短信的设计,以便像突出显示它更明显?我当前正在使用以下代码

const youtubeService = {};
youtubeService.insertMessage = messageText => {
console.log(myliveChatId);
const response = youtube.liveChatMessages.insert(
{
  auth: auth,
  part: 'snippet',
  resource: {
    snippet: {
      type: 'textMessageEvent',
      liveChatId: myliveChatId,
      textMessageDetails: {
        messageText: 'hello man'
      }
     }
    }
   },
   (error) => {
      console.log(error);
   }
  );
    console.log(response);
  };

编辑:

这是聊天消息通常出现

”在此处输入图像描述

我想要的就是这样的东西

“在此处输入映像说明”

注意:插入我的livestrameamemem通过代码不会通过我的帐户,而是别人的帐户。

Hi so i am manually inserting in my live stream using a node js googleapis/youtube package. The message shows as a plain text message, what i would like to know is how can i change the design of this text message so that it is more noticeable like maybe highlighting it? I am currently using the following code

const youtubeService = {};
youtubeService.insertMessage = messageText => {
console.log(myliveChatId);
const response = youtube.liveChatMessages.insert(
{
  auth: auth,
  part: 'snippet',
  resource: {
    snippet: {
      type: 'textMessageEvent',
      liveChatId: myliveChatId,
      textMessageDetails: {
        messageText: 'hello man'
      }
     }
    }
   },
   (error) => {
      console.log(error);
   }
  );
    console.log(response);
  };

EDIT:

This is how a chat message usually appears

enter image description here

what i want is something like this

enter image description here

Note: The message that is inserted onto my livestream via the code wont be through my account but rather someone else's.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文