Releases: sigvt/masterchat
Releases · sigvt/masterchat
v1.1.0
v1.0.0
- 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
toMarkChatItemAsDeletedAction
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
v0.14.0
- 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
New
- New action:
AddMembershipMilestoneItemAction
. Refer toduration
for a precise membership duration - New action:
ShowPollPanelAction
. - Add
timestampColor
andauthorNameTextColor
toSuperChat
- New util
stringify
to transformYTRun[]
,YTRunContainer
andYTSimpleText
into string - New util
formatColor
to formatColor
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 intoAddSuperChatItemAction
- 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 oferror
in some special cases where the unrecoverable error code is eitherprivate
orunavailable
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 expandwatchEndpoint
whentext
is a fragment of URL - use Uint8Array instead of Buffer in protobuf lib (by @jprochazk)
Fixes
- BREAKING: remove
unknown
type fromMasterchatError
- Deprecate
Credentials.SESSION_ID
in favor ofCredentials.DELEGATED_SESSION_ID
v0.12.0
- BREAKING: Merged
MasterchatAgent
intoMasterchat
- Use
on
andlisten
.iterate
andfetch
are still available for advanced users
- Use
- 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() } })
- i.e.
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
inrunsToString
now takesYTEmojiRun
instead ofYTEmoji
- Added
textHandler
option torunsToString
- BREAKING:
runsToString
will expand truncated urls (Thanks @stu43005)
v0.11.0
- 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 returnsundefined
when the given string doesn't contains any valid id pattern
- fix format issue in default emoji handler of
runsToString
v0.10.0
- Support legacy pageId session (append
SESSION_ID
toCredentials
)
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 setisLive
optiontrue
orfalse
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
- if unset,
- 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
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)
ORfetch({topChat})
AddSuperChatItemAction.currency
always contains normalized three-letter currency code
tools
- Added diagnosis toolkit
utils
- Renamed
convertRunsToString
->runsToString
v0.8.0
- 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/masterchat-cli@0.7.1...v0.8.0