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

Media session support #36

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kalaspuffar
Copy link
Contributor

Listened to a video about the media session API (https://www.youtube.com/watch?v=57Scec2XPd0) and I thought it would be nice to have it in the paper-audio-player.

So I did a rudimentary implementation of this API. What do you think @gorork ?

@gorork
Copy link
Owner

gorork commented Mar 22, 2017

@kalaspuffar Awesome feature! 👍
Do you have an Android device to test this feature live?

@kalaspuffar
Copy link
Contributor Author

Hi @gorork

Well I have a Nexus 6P. I didn't have a cord at work last but today I brought one and tested. It works in Chrome Beta for Android. Beta builds are at version 58, the function came in 57.

So in the current chrome version of 56 it will not work but I guess that 57 is just around the corner. But when I've changed the callbacks to be anonymous functions it worked fine.

If you have it a description, album art and so on can be displayed so if you like I can add those as properties.

Test page from google: https://googlechrome.github.io/samples/media-session/audio.html

Best regards
Daniel

@gorork
Copy link
Owner

gorork commented Mar 30, 2017

@kalaspuffar Adding more standalone properties doesn't seem like a good solution. Better, we could add an optional property that consumes object with properties that corresponds to the mediaSession.metadata. This could be called metadata. What do you think?

@kalaspuffar
Copy link
Contributor Author

Sounds like a great idea. This will be future prof as well. The API may be extended in later releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants