Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature proposal: Add support for seeking or changing the progress of the media playback #97

Closed
Samuel12321 opened this issue Oct 9, 2020 · 10 comments · Fixed by #369
Closed
Assignees
Labels
Enhancement New feature or request Fixed Has been fixed. Low Priority

Comments

@Samuel12321
Copy link
Member

Samuel12321 commented Oct 9, 2020

from @Samkunmiayo's request
Is your feature request related to a problem? Please describe:

Amazing app! Would be amazing to have the ability to seek the current audio in the timeline info section.

Describe the solution you'd like:

Addition of a seek feature similar to the volume slider to enable the user go to a certain section of the song or podcast, like in spotify for example

Describe alternatives you've considered:

Additional context:

image

@Samuel12321 Samuel12321 added Enhancement New feature or request Super Low Priority labels Oct 9, 2020
@ShankarBUS
Copy link
Member

#49 (comment)

@Poopooracoocoo,

still can't seek in the GMC or STMC >:(

We can actually seek the playback iff the source app supports seeking through SMTC. Currently we only have a ProgressBar to show the timeline properties. We could replace that with a slider to actually control the playback from our app. But the last time I tried, it was really slow. I will reconsider this in future versions

References :

Our side of control :

Media apps' side :

GlobalSystemMediaTransportControlsSession.TryChangePlaybackPositionAsync(Int64) Method doesn't work unfortunately 🤷‍♂️. So this will not be worked on.

@ShankarBUS ShankarBUS added Invalid This doesn't seem right Wontfix This will not be worked on labels Oct 11, 2020
@ShankarBUS ShankarBUS self-assigned this Oct 17, 2020
@Samuel12321
Copy link
Member Author

GlobalSystemMediaTransportControlsSession.TryChangePlaybackPositionAsync(Int64) Method doesn't work unfortunately 🤷‍♂️. So this will not be worked on.
Why? is it broken like GlobalSystemMediaTransportControlsSessionManager.SessionsChanged

@ShankarBUS
Copy link
Member

It doesn't accept a timespan as a parameter.

I didn't know in what format we have to pass the requested position in.

It resets to zero for any value I pass.
I will reinvestigate this later.

@Samuel12321 Samuel12321 reopened this Nov 16, 2020
@Samuel12321
Copy link
Member Author

Highly requested feature, warrants further investigation.

@Samuel12321 Samuel12321 added Low Priority and removed Super Low Priority Invalid This doesn't seem right Wontfix This will not be worked on labels Nov 16, 2020
@ShankarBUS
Copy link
Member

ShankarBUS commented Nov 17, 2020

Let me be honest with you.

Most apps which consume the SMTC APIs don't care about functions other play, pause, next, previous, media title, media artist and thumbnail.

They just simply ignore other functionalities of the SMTC APIs.

Some apps could report their playback position while not others.

I'm not sure if any one of them support seeking.

There's nothing we can do on our side without the media source app's side support.

They have to hook things up to make it work.

Android is a different case.
Android has a limited amount of media playback APIs, so there's a good chance the Android developers use the official APIs to play media instead of 3rd party or custom methods. Thus, securing complete integration with Android's Global media controls feature!

But Windows!!!!

There's literature a ton of distinct APIs and libs to play media.

There are multiple platforms or frameworks to build Windows apps.
Each have their own method to play media. There's no built-in support for SMTC in non-UWP apps.

App devs have to hook the SMTC themselves to whatever media playback API they use. Thus, resulting in this incomplete support and making the SMTC feature of Windows insignificant.

While UWP apps have complete integration and out-of-the-box support for SMTC (with guidelines and samples and D O C S), they still don't make use of or hook all the functionalities of the SMTC!

(UWP devs still have to hook SMTC themselves though 😅).

We are underestimating the true power of SMTC APIs.

If all done correctly, we can also get support for changing the volume of the media sessions, fast forward, rewind and control the playback rate!

@Samuel12321
Copy link
Member Author

But Windows!!!!

Doesn't that just about sum everything up.

@ShankarBUS
Copy link
Member

Just found out a similar issue:

MicrosoftDocs/winrt-api#1725

Seems like the TryChangePlaybackPositionAsync method itself have some major problems.

It doesn't have proper documentation and provides unreliable reports about the result of changing the playback position.

If anyone want to see this feature implemented, please bring enough attention (by voting or commenting) to the fore-mentioned issue. Let's see if they notice the issue and provide us any workarounds.

@ShankarBUS
Copy link
Member

Man f*** GlobalSystemMediaTransportControls!

@ADeltaX showed me this https://cdn.discordapp.com/attachments/772345967785672734/788750160297590814/2020-12-16_13-50-52.mp4 half an hour ago.

You can see the seeking actually work. All hail lord @ADeltaX!
Thanks for the NowPlayingSessionManager!

@prakharb5
Copy link
Member

The fact that old APIs are more reliable and better just proves the fact, in a way, that Win7 is better than Win10 (older better than new). 😂😂😂

@ShankarBUS
Copy link
Member

So, this thing happened while me and @ADeltaX where chatting.
image

https://kapwi.ng/c/W4NYHflh

LOL. Just "3 words" and he solved a month long suffering.

@ShankarBUS ShankarBUS mentioned this issue Jan 18, 2021
@prakharb5 prakharb5 added the Fixed Has been fixed. label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Fixed Has been fixed. Low Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants