broulik added a comment.

  Thanks for your patch! There's a minor issue but other than that it's good.
  Can you also verify this doesn't cause a loop when using Plasma's media 
controller applet?

INLINE COMMENTS

> content-script.js:177
> +    if (activePlayer) {
> +        if (!activePlayer.seekable) {
> +            console.warn("Got seek command, but player is not seekable");

The `seekable` property isn't an int but a `TimeRanges` object that tells you 
which portions of the player are seekable so this will never be `false`

[1] https://www.w3schools.com/tags/av_prop_seekable.asp

> mprisplugin.cpp:205
> +        const qreal position = 
> data.value(QStringLiteral("currentTime")).toDouble() * 1000 * 1000;
> +        Q_EMIT(((MPrisPlayer *) m_player)->Seeked((qlonglong) position));
> +        setPosition(position);

Can't you just do `emit Seeked(position)`?

REPOSITORY
  R856 Plasma Browser Integration

REVISION DETAIL
  https://phabricator.kde.org/D13717

To: mokhtari, broulik
Cc: nicolasfella, plasma-devel, #kde_connect, timothyc, jdvr, yannux, 
Danial0_0, johnq, ragreen, Pitel, adeen-s, SemperPeritus, ndavis, daniel.z.tg, 
jeanv, ZrenBot, seebauer, bugzy, MayeulC, menasshock, lesliezhai, ali-mohamed, 
jensreuterberg, ach, abetts, sebas, apol, mart

Reply via email to