Code Monkey home page Code Monkey logo

Comments (8)

SyncedSynapse avatar SyncedSynapse commented on August 21, 2024

The issue here is that calling GetProperties on jsonrpc through TCP, immediately after a video is started, always returns the Time as (near) 0, ignoring the video resume point.

The sequence of events is (calling jsonrpc through TCP):

  1. Start a video that has a resume point, and select to start it from that resume point (note: this shows a dialog box on Kodi, which might be interfering with the TCP listener thread?);
  2. Kodi issues a Player.OnPlay notification;
  3. Kore gets the notification and immediately calls GetActivePlayers followed by GetProperties (with Time as one of the params);
  4. The Time returned from GetProperties doesn't reflect the correct time of the video. It's not 0, the milliseconds field usually has some value, so it seems to be counting from the moment when the video was started (?), but it's not the correct time of the video (which should be with the resume time);
  5. Subsequent calls to GetProperties return the correct Time;
  6. If a slight delay is included before the first call to GetProperties (like 0.5s for instance), it returns the correct time, so this issue only occurs if it is called immediately after starting the video.

@Montellese do you have any insight into this? I can try working around this on Kore, though it will be ugly.

from kore.

Montellese avatar Montellese commented on August 21, 2024

I don't know the internals of the player either @FernetMenta might be able to give some insight here.

Are you asking for the current playback time only once and then only update the progress locally until the next notification or user interaction?

from kore.

FernetMenta avatar FernetMenta commented on August 21, 2024

does this apply to current master?

from kore.

Montellese avatar Montellese commented on August 21, 2024

According to the report this is with Kodi 14.0 Dec 12 2014 so no.

from kore.

SyncedSynapse avatar SyncedSynapse commented on August 21, 2024

@Montellese That's correct: if connected through TCP the remote only updates the info on a user action/notification/exit. Through HTTP it keeps polling kodi about what's playing (every 3s iirc), so this issue doesn't persist for long.

@FernetMenta I've tested it with the current master and it also happens.

I don't think this is something serious, but it is a curious one. Small differences in timing have different results.

from kore.

FernetMenta avatar FernetMenta commented on August 21, 2024

the problem is that application wrongly interprets the return value of m_pPlayer->GetDisplayTime(). A value of zero means undefined. It takes some time for player to get started, during this time it returns zero.

from kore.

Montellese avatar Montellese commented on August 21, 2024

@FernetMenta: Why does the player execute the OnPlaybackStarted() callback if playback hasn't actually started yet. Because that's what JSON-RPC uses as a trigger to send the Player.OnPlay notification.

from kore.

FernetMenta avatar FernetMenta commented on August 21, 2024

Seems the definition of "playback started" is ambiguous. Playback has started but that does not mean that we have a first frame on screen.

from kore.

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.