Giter VIP home page Giter VIP logo

Comments (6)

zerodytrash avatar zerodytrash commented on May 18, 2024

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))

image

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

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.

OlegShklyarov avatar OlegShklyarov commented on May 18, 2024

Thank you for your help, I will try.

from tiktok-live-connector.

OlegShklyarov avatar OlegShklyarov commented on May 18, 2024

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.

zerodytrash avatar zerodytrash commented on May 18, 2024

No, on client side, https://github.com/zerodytrash/TikTok-Chat-Reader/blob/d011ad941b85e27c59919dde3df0132dbcc07456/public/app.js#L25-L38

from tiktok-live-connector.

OlegShklyarov avatar OlegShklyarov commented on May 18, 2024

We do not deserve people like you. Many thanks.

from tiktok-live-connector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.