Skip to content

add MediaSession integration for mediaplayer#262

Open
Blockyheadman wants to merge 4 commits into
developmentfrom
blocky-mediaplayer-integration
Open

add MediaSession integration for mediaplayer#262
Blockyheadman wants to merge 4 commits into
developmentfrom
blocky-mediaplayer-integration

Conversation

@Blockyheadman
Copy link
Copy Markdown
Member

@Blockyheadman Blockyheadman commented May 28, 2026

This, simply put, adds integration with the browser's MediaSession API which lets the OS have some information on the current playing audio.

screenshot unknown

@Blockyheadman Blockyheadman self-assigned this May 28, 2026
@Blockyheadman Blockyheadman added enhancement New feature or request New feature This issue adds a new feature that has never been seen before Browser stuff Browser support, history, navigation labels May 28, 2026
@Blockyheadman
Copy link
Copy Markdown
Member Author

Blockyheadman commented May 28, 2026

Reason being for the draft PR is to discuss this further if needed and of course change things as need.

@github-actions
Copy link
Copy Markdown

✅ Preview deployment is ready: https://team.arcweb.nl/previews/framed/blocky-mediaplayer-integration

@github-actions
Copy link
Copy Markdown

✅ Preview deployment is ready: https://team.arcweb.nl/previews/framed/blocky-mediaplayer-integration

@IzKuipers
Copy link
Copy Markdown
Member

me likey

Copy link
Copy Markdown
Member

@IzKuipers IzKuipers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff, good stuff

Comment thread src/apps/user/mediaplayer/runtime.ts Outdated
Comment thread src/apps/user/mediaplayer/runtime.ts
Comment thread src/interfaces/runtimes/IMediaPlayerRuntime.ts
@github-actions
Copy link
Copy Markdown

✅ Preview deployment is ready: https://team.arcweb.nl/previews/framed/blocky-mediaplayer-integration

@Blockyheadman Blockyheadman requested a review from IzKuipers May 28, 2026 15:47
@Blockyheadman Blockyheadman marked this pull request as ready for review May 28, 2026 15:47
if ("mediaSession" in navigator) {
this.Log("updating mediaSession");

const albumCoverURL = metadata?.coverImagePath ? await Fs.direct(metadata!.coverImagePath!) : undefined;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this already available as this.CurrentCoverUrl?

navigator.mediaSession?.setActionHandler("nexttrack", this.nextSong.bind(this));
navigator.mediaSession?.setActionHandler("seekto", (details) => {
this.SeekTo(details.seekTime!);
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to include the current time of the media?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

✅ Preview deployment is ready: https://team.arcweb.nl/previews/framed/blocky-mediaplayer-integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Browser stuff Browser support, history, navigation enhancement New feature or request New feature This issue adds a new feature that has never been seen before

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants