Skip to content

Releases: sigvt/masterchat

v1.1.0

02 Jun 03:59
Compare
Choose a tag to compare
  • feat: reintroduce Async Iterator API be672d8
  • fix: membership in AddMembershipMilestoneItemAction and AddMembershipItemAction now becomes optional b02a0e6
  • feat: reintroduce async iterator fa2fabd
  • feat: new event chat for event emitter 33c4f8c

v1.0.0...v1.1.0

v1.0.0

27 May 17:34
Compare
Choose a tag to compare
  • fix(playlist): support any browse id f036f1b
  • feat: new action AddRedirectBannerAction 3f1747d
  • fix: use direct method for most of moderation APIs ff73d0e
  • feat: Detect being timeouted by moderator when sending a chat 0c0ba71
  • feat: Add executor to MarkChatItemAsDeletedAction c64ebb6
  • feat: new action moderationMessageAction 80123c7
  • fix: handle invalid banner header 37ed5f0
  • fix(transcript): fetch alternative sub when failed 4d12dc1
  • fix(transcript): accept language param 1fbbd57
  • feat: transcript API 2efd90e
  • fix!: move comments API into Masterchat class cfd1a90
  • fix: treat ERR_REQUEST_ABORTED as aborted d528de3
  • feat: async iterator 535a22a
  • fix: reintroduce timeout drift adjustment 7e018f4
  • fix: don't overwrite isLive unless it is undefined 12cbe54

v0.15.0...v1.0.0

v0.15.0

05 Apr 17:17
Compare
Choose a tag to compare
  • fix: handle empty authorBadges 0a3d15c
  • fix: handle axios timeout error 49f301c
  • perf: migrate to axios e2de3d1
  • fix: authorName in addMembershipItemAction now becomes optional 6d08628
  • perf: ditch timeout adjustment 64444a6

v0.14.0...v0.15.0

v0.14.0

05 Mar 08:59
Compare
Choose a tag to compare
  • fix: properly handle membership ticker action c137d95
  • fix: poll result now returns YTRun[] ceef870
  • feat: add support for membership gift d619330
  • fix: Special handling for anomalous emoji entities b1d4d15
  • feat: new action AddPollResultAction c30abd0
  • feat: new API getComment fd3d177
  • fix!: normalize replacementItem in ReplaceChatItemAction 9695ed8
  • fix!: improve AddBannerAction 7483e6f
  • fix: observed empty authorName in membership event c943c73
  • feat!: add comments module ee91b29

v0.13.0...v0.14.0

v0.13.0

17 Oct 04:46
Compare
Choose a tag to compare

New

  • New action: AddMembershipMilestoneItemAction. Refer to duration for a precise membership duration
  • New action: ShowPollPanelAction.
  • Add timestampColor and authorNameTextColor to SuperChat
  • New util stringify to transform YTRun[], YTRunContainer and YTSimpleText into string
  • New util formatColor to format Color into CSS rgba() or HEX string
  • New util durationToISO8601 to format duration text into ISO8601 duration string
  • New util durationToSeconds to format duration text into integer seconds
  • New util tsToDate to format timestampUsec to Date
  • New util tsToNumber to format timestampUsec to number

Improvements

  • BREAKING: normalized all the raw interfaces:
    • AddBannerAction
    • AddMembershipItemAction
    • AddMembershipTickerAction
    • AddPlaceholderItemAction
    • AddSuperChatTickerAction
    • AddSuperStickerItemAction
    • AddSuperStickerTickerAction
    • AddViewerEngagementMessageAction
    • ClosePanelAction
    • ShowPanelAction
    • ShowTooltipAction
  • BREAKING: renamed ShowLiveChatActionPanelAction -> ShowPanelAction
  • BREAKING: renamed UpdateLiveChatPollAction -> UpdatePollAction
  • BREAKING: renamed CloseLiveChatActionPanelAction -> ClosePanelAction
  • DEPRECATED: AddChatItemAction.rawMessage -> AddChatItemAction.message
  • DEPRECATED: AddSuperChatItemAction.rawMessage -> AddSuperChatItemAction.message
  • DEPRECATED: props of AddSuperChatItemAction.superchat has been flattened into AddSuperChatItemAction
  • BREAKING: end event will provide a reason ('privated' | 'deleted' | 'disabled' | 'aborted' | null)
    • streamPool.on('end', (mc) => {}) -> streamPool.on('end', (reason, mc) => {})
  • BREAKING: instance will emits end instead of error in some special cases where the unrecoverable error code is either private or unavailable and it was not occurred during the first request (this usually happens when a streamer deletes or privates their live stream after the stream ends)
  • BREAKING: runsToPlainText will expand watchEndpoint when text is a fragment of URL
  • use Uint8Array instead of Buffer in protobuf lib (by @jprochazk)

Fixes

  • BREAKING: remove unknown type from MasterchatError
  • Deprecate Credentials.SESSION_ID in favor of Credentials.DELEGATED_SESSION_ID

v0.12.0

25 Sep 13:55
Compare
Choose a tag to compare
  • BREAKING: Merged MasterchatAgent into Masterchat
    • Use on and listen. iterate and fetch are still available for advanced users
  • BREAKING: new Masterchat(..., {isLive?: boolean}) -> new Masterchat(..., {mode?: "live" | "replay"})
  • Added type definition for once
  • New metadata property
  • BREAKING: Renamed MasterchatManager -> StreamPool
  • BREAKING: In StreamPool event callback, (metadata: Metadata, ...) => {} -> (..., mc: Masterchat) => {}
    • i.e. on("actions", ({ videoId }, actions) => {}) -> on("actions", (actions, { videoId }) => {})
    • e.g. on("data", (data, mc) => { if (...) { mc.stop() } })

before:

const mc = new Masterchat(videoId, ...)

try {
  for await (const { actions } of mc.iterate()) {
    const chats = actions.filter(action => action.type === "addChatItemAction")
    ...
    if (youWant) break;
  }
} catch(err) {
  ...
}

now:

const mc = new Masterchat(videoId, ...)
  .on("chats", chats => {
    ...
    if (youWant) mc.stop();
  })
  .on("error", err => {
    ...
  })

mc.listen()

utils

  • BREAKING: emojiHandler in runsToString now takes YTEmojiRun instead of YTEmoji
  • Added textHandler option to runsToString
  • BREAKING: runsToString will expand truncated urls (Thanks @stu43005)

v0.11.0

25 Sep 13:55
Compare
Choose a tag to compare
  • Masterchat Agent for handling events using EventEmitter
  • Masterchat Manager for processing multiple live streams
  • required Node.js version is now v16.6.0 or higher
  • re-export more yt types

utils

  • Renamed normalizedVideoId -> toVideoId
    • toVideoId will returns undefined when the given string doesn't contains any valid id pattern
  • fix format issue in default emoji handler of runsToString

v0.10.0

12 Sep 10:37
Compare
Choose a tag to compare
  • Support legacy pageId session (append SESSION_ID to Credentials)

chatActions

  • .remove will use homebrew pb params

chat

  • .fetch will attempt to switch an API endpoint to the replay chat if failed to fetch chats from the live chat. Explicitly set isLive option true or false when instiantiating Masterchat to disable this behavior.
    • if unset,
      • live -> OK
      • archive -> first request fails, then try fetching replay chat -> OK
    • if set true:
      • live -> OK
      • archive -> throw DisabledChatError
    • if set false:
      • live -> throw DisabledChatError
      • archive -> OK
  • Supported .fetch overloading
    • .fetch(options?: FetchChatOptions)
    • .fetch(token: string, options?: FetchChatOptions)
  • Renamed SucceededChatResponse -> ChatResponse
  • Dropped ignoreReplayTimeout option from .iterate

extra

  • credential-fetcher now supports parsing legacy session id

v0.9.0

09 Sep 19:15
Compare
Choose a tag to compare

v0.9.0

  • Full protobuf support
  • Use new Masterchat(videoId, channelId, {isLive}) for skipping metadata fetching. Masterchat.init(videoId) scrapes watch page in order to obtain channelId and livechat status
  • Renamed masterchat/types/... -> masterchat/yt/...
  • Renamed Masterchat.metadata.isLive -> Masterchat.isLive
  • Renamed Masterchat.metadata.channelId -> Masterchat.channelId
  • Renamed Masterchat.metadata.channelName -> Masterchat.channelName
  • Renamed Masterchat.metadata.title -> Masterchat.title
  • Removed Masterchat.isReplay

context

  • fetchMetadata() -> Masterchat.populateMetadata()

chat

  • iterateChat("top" | "all") -> iterate({topChat: true|false}),
  • fetchChat({continuation}) -> fetch(b64Token) OR fetch({topChat})
  • AddSuperChatItemAction.currency always contains normalized three-letter currency code

tools

  • Added diagnosis toolkit

utils

  • Renamed convertRunsToString -> runsToString

v0.8.0...v0.9.0

v0.8.0

31 Aug 04:58
Compare
Choose a tag to compare
  • fix(chat): revert retry fns 1e2b2e5
  • fix: accept credentials in b64 JSON format acecc7e
  • fix!: flatten iterateChat args 772997e
  • feat!: homebrew sendMessage params cef8d92
  • feat: initial protobuf support 053f055
  • fix: drop abandoned stream support 7a33a4b
  • feat!: immediately throw errors when verification failed a774f79
  • fix: do not check success prop 1d07654
  • feat!: narrow down some response 1ad28a0
  • feat!: moderation fns 739130f
  • fix!: rename live chat fns af487ae

https://github.com/holodata/masterchat/compare/[email protected]