Comments (3)
업데이트합니다. 방송이 꺼진 후 채팅은 제대로 받아와집니다. 방송이 꺼진 후 다시 켜졌을 때에만 해당되는 것으로 보입니다.
from chzzk.
방송이 시작될 때마다 chatChannelId가 변경되는 문제로 인해 발생한 오류로 보입니다.
from chzzk.
답변이 늦어 죄송합니다!
공식 사이트를 모방하여 일정 주기마다 chatChannelId
의 변경을 체크할 수 있도록 1.2.0
버전에 pollInterval
옵션을 추가하였습니다.
chatChannelId
가 변경된 것이 확인될 경우 자동으로 새로운 chatChannelId
로 재연결하게 됩니다.
ChzzkChat 인스턴스를 생성할 때 channelId
값을 넘겨주도록 변경되었으니 아래 코드를 참고 부탁드립니다.
channelId
값만 넘겨주면 chatChannelId
, accessToken
값은 내부에서 자동으로 불러오게 되어있습니다.
const client = new ChzzkClient()
const result = await client.search.channels("녹두로로")
const channel = result.channels[0]
const chzzkChat = client.chat({
channelId: channel.channelId,
pollInterval: 30 * 1000 // channelId를 지정할 경우 자동으로 30초로 설정됨
})
from chzzk.
Related Issues (20)
- disconnect() 메서드에 문제가 있는 것 같습니다. HOT 2
- followDate HOT 1
- README.md 수정 요청 HOT 1
- manage 관련 HOT 8
- 로그인 쿠키 관련. HOT 2
- TypeError: fetch failed (ECONNRESET) HOT 1
- LiveSettingParams Type 누락 HOT 1
- 메시지가 고정 해제될 때 오류 발생 HOT 1
- 채팅 구독 뱃지 지원 HOT 1
- subscription 이벤트 웹소켓 HOT 1
- [Bug] 검색 결과가 없을 시 오류 발생 HOT 1
- livePlaybackJson HOT 2
- 이모티콘 전송 기능 HOT 1
- 첫 실행 시 오류 발생 HOT 1
- Chat list is not iterable HOT 3
- 채널의 방송이 종료되었을 때 프로그램 실행이 중단됨 HOT 2
- 로컬 개발 환경에서 CORS 프록시 사용을 위한 코드 개선 HOT 3
- API 버전 자동 변경 HOT 1
- JSON Parse error: Unexpected identifier "undefined" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chzzk.