Comments (6)
The client-side and server-side wrappers used for TikTok-Chat-Reader does not include the getRoomInfo
function. But you could easily add them to the wrapper. However, it is currently possible to get the room info by taking it from the connect result. I think the video pull url doesn't change, so you don't need to retrieve the roomInfo
again during the connection. Therefore this should be sufficient.
connection.connect('@username').then(state => {
console.log(state.roomInfo.stream_url.flv_pull_url.HD1);
}).catch(err => console.error(err))
from tiktok-live-connector.
btw it may make more sense to use state.roomInfo.stream_url.hls_pull_url
instead flv_pull_url
because HLS playback is better supported in web browsers. You can play it with VideoJS or paste the URL here: https://videojs.github.io/videojs-contrib-hls/
from tiktok-live-connector.
Thank you for your help, I will try.
from tiktok-live-connector.
Should I just add it like that?
const { WebcastPushConnection } = require('tiktok-live-connector');
const { EventEmitter } = require('events');
let globalConnectionCount = 0;
/**
* TikTok LIVE connection wrapper with advanced reconnect functionality and error handling
*/
connection.connect(uniqueId).then(state => {
console.log(state.roomInfo.stream_url.flv_pull_url.HD1);
}).catch(err => console.error(err))
from tiktok-live-connector.
No, on client side, https://github.com/zerodytrash/TikTok-Chat-Reader/blob/d011ad941b85e27c59919dde3df0132dbcc07456/public/app.js#L25-L38
from tiktok-live-connector.
We do not deserve people like you. Many thanks.
from tiktok-live-connector.
Related Issues (20)
- envelope
- Websocket error
- Every few minutes, the connection stops, possibly due to Cloudflare implemented on TikTok. This issue also exists in the Python version
- TypeError: ProxyAgent is not a constructor
- ranked members joining not detected HOT 1
- Parse Error HOT 5
- Error: Failed to fetch room info. timeout of 10000ms exceeded
- Too Many Requests [429] HOT 2
- [Bug] Unhandled "Interval" when process is shutdown leading to application Timeouts.
- Too Many Requests [429] HOT 2
- [Bug] Connected to the live room and no data was received after that HOT 8
- More info on these config URLs
- Websocket connection failed, Error: Expected a Sec-WebSocket-Protocol header. HOT 6
- Error: Request failed with status code 429 HOT 3
- [Question] Any way to obtain a real-time list of the most viewed live streams on the platform?
- How can I contact you?
- Too Many Requests [429]
- Failed to connect Error: Missing cursor in initial fetch response. HOT 12
- Not continue listening after the StreamEnd
- liveIntro event always saying "Kommt auf denn Server drauf!!!" 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 tiktok-live-connector.