Seek to end as mpris next action
Changes PlannedPublic

Authored by seijikun on Jul 2 2019, 8:02 PM.

Details

Reviewers
broulik
Summary

Most pages where the mpris functionality is used will probably have an auto-continue feature for when the end of a media is reached.
Now, if mpris sends the next-signal, seeking to the end of the video is probably the most reliable way of continuing to the next in line.
Works like a charm on YouTube.

Sorry if anything is wrong, this is my first contribution.

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
seijikun created this revision.Jul 2 2019, 8:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 2 2019, 8:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
seijikun requested review of this revision.Jul 2 2019, 8:02 PM
seijikun added a reviewer: broulik.

Thanks for your patch.
fastSeek doesn't seem to be part of the HTML audio/video DOM API and also isn't supported by Chrome.
A website should provide a nexttrack callback if it supports changing tracks, which YouTube does while watching playlists. Your patch would unconditionally seek, even if the website did.
Also, you never announce that we can go next (and I don't think we can tell), so this shouldn't even work, but that it does is a bug.

seijikun planned changes to this revision.Jul 3 2019, 7:53 PM

Oh, I'm sorry. I had a look in this list here and thought, that all methods without a warning triangle are good to go.
I guess this one would be the way to go, then?

Also, you never announce that we can go next (and I don't think we can tell), so this shouldn't even work, but that it does is a bug.

I noticed, that the Next-Button worked, even though the GUI-buttons in the MPRIS tray are disabled, but I couldn't find out how to announce that it's supported.

A website should provide a nexttrack callback if it supports changing tracks, which YouTube does while watching playlists.

Is that what lines 217 to 226 are for, because that does not seem to work for me in Firefox? Neither with normal videos, nor in playlists.