Skip to content

EtherDream/media-popup-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Media Popup Player

Watch videos on the album artwork of music control bar.

Demo

https://etherdream.com/media-popup-player/demo.html

(Windows) System Media Transport Controls:

demo.mp4

(iOS) Lock Screen:

mobile.mp4

Try

Open a video website and inject popup-player.js, then run:

mediaPopupPlayer.bindVideo(document.querySelector('video'))
youtube.mp4

API

  • void bindVideo(video: HTMLVideoElement)

  • void unbindVideo()

  • void setSize(width: number, height: number)

    Set the resolution of the artwork. Default 256x256.

  • void setFrameRate(fps: number)

    Set the rendering frame rate. Default 60.

  • void unload()

    Free this library (terminate timer, etc.), call bindVideo will re-init.

Known Issues

Firefox: MediaSession does not support dynamically generated images, i.e. data url, blob, and cannot be intercepted by Service Worker.

Related Projects

About

Watch videos on the album artwork of music control bar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published