Skip to content

Instantly share code, notes, and snippets.

@gotbahn
Created March 7, 2020 13:20
Show Gist options
  • Save gotbahn/998de221601757a15f01a8ebbac6aae6 to your computer and use it in GitHub Desktop.
Save gotbahn/998de221601757a15f01a8ebbac6aae6 to your computer and use it in GitHub Desktop.
Media Session. Control Position
if (window.navigator.mediaSession?.setPositionState) {
window.navigator.mediaSession.setPositionState({
duration: /* duration in seconds */,
position: /* position from 0 in seconds */,
playbackRate: 1,
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment