Giter VIP home page Giter VIP logo

Comments (18)

zerodytrash avatar zerodytrash commented on May 18, 2024

hi,
this is a strange behavior. Have not experienced this problem before.
Can you check if a websocket connection is used? You can see this in the promise result of the connect() function.
Property: upgradedToWebsocket

from tiktok-live-connector.

asdfg314284230 avatar asdfg314284230 commented on May 18, 2024

Hello, I have encountered such a problem, may I ask if there is any way to fix it?

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

The error did not occur in my case. If someone can reproduce the problem, feel free to fix it.

from tiktok-live-connector.

asdfg314284230 avatar asdfg314284230 commented on May 18, 2024

This may be related to my use of the system agent caused by repeated monitoring, SO far I have not been able to find the cause.

from tiktok-live-connector.

asdfg314284230 avatar asdfg314284230 commented on May 18, 2024

Or 3 or 8 repeat chat events can occur when the number of channels monitored is small.

from tiktok-live-connector.

OlegShklyarov avatar OlegShklyarov commented on May 18, 2024

May I ask here? How to emit roomInfo from connectionWrapper?

	this.connection.getRoomInfo().then(roomInfo => {
		this.log(`HLS URL: ${roomInfo.stream_url.flv_pull_url.HD1}`);
		this.emit(`HLS URL: ${roomInfo.stream_url.flv_pull_url.HD1}`);
		})

Is this correct?

from tiktok-live-connector.

pixorama avatar pixorama commented on May 18, 2024

The error did not occur in my case. If someone can reproduce the problem, feel free to fix it.

Yes, there is such a problem. It occurs in chats with a small number of participants.
I figured out how it happens. The query periodically returns cursor = 0, which causes the chat messages to be requested from the beginning.

I wrote a C# library similar to this one. In my implementation, I simply check that the new cursor is not equal to 0. If it is, then I ignore the query result and make a new one with the previous cursor.

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

The error did not occur in my case. If someone can reproduce the problem, feel free to fix it.

Yes, there is such a problem. It occurs in chats with a small number of participants. I figured out how it happens. The query periodically returns cursor = 0, which causes the chat messages to be requested from the beginning.

I wrote a C# library similar to this one. In my implementation, I simply check that the new cursor is not equal to 0. If it is, then I ignore the query result and make a new one with the previous cursor.

The null cursor fix is already implemented:

if (webcastResponse.cursor) {
this.#clientParams.cursor = webcastResponse.cursor;
}

Let me know if the problem persists.

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

May I ask here? How to emit roomInfo from connectionWrapper?

	this.connection.getRoomInfo().then(roomInfo => {
		this.log(`HLS URL: ${roomInfo.stream_url.flv_pull_url.HD1}`);
		this.emit(`HLS URL: ${roomInfo.stream_url.flv_pull_url.HD1}`);
		})

Is this correct?

Not sure what you want to do with the code. Please create a new issue since this has nothing to do with this issue.

from tiktok-live-connector.

asdfg314284230 avatar asdfg314284230 commented on May 18, 2024

from tiktok-live-connector.

asdfg314284230 avatar asdfg314284230 commented on May 18, 2024

from tiktok-live-connector.

asdfg314284230 avatar asdfg314284230 commented on May 18, 2024

from tiktok-live-connector.

Davincible avatar Davincible commented on May 18, 2024

@zerodytrash If you look at the proto contents of chat events there are a various types of IDs, I think you can use one of them to identify messages uniquely. I've looked at it briefly but not in-depth

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

@zerodytrash If you look at there proto contents of chat events there are a various types of IDs, I think you can use one of them to identify messages uniquely. I've looked at it briefly but no in-depth

good point. does anyone still have problems with duplicate events?

from tiktok-live-connector.

METAIRONY avatar METAIRONY commented on May 18, 2024

Hello, I ran into a problem with duplicate gift event

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

Hello, I ran into a problem with duplicate gift event

make sure you handle gift streaks correctly
https://github.com/zerodytrash/TikTok-Live-Connector#gift

from tiktok-live-connector.

zerodytrash avatar zerodytrash commented on May 18, 2024

There is a new event attribute msgId in the latest version which can be used to detect duplicates.

from tiktok-live-connector.

artwl avatar artwl commented on May 18, 2024

I also encountered the problem of repeated gift messages today, and both msgId and createTime are not repeated

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.