3 ms·
It's possible. But you currently have to write code for each platform; iOS uses a Cordova plugin for this, so your JS has to talk to Cordova. Windows uses its o
by judah 9y ago
It's possible. But you currently have to write code for each platform; iOS uses a Cordova plugin for this, so your JS has to talk to Cordova. Windows uses its own proprietary namespace which is injected into your app, so you write JS that talks to the proprietary Windows API.
Google is the unique bright light here. They've submitted a web standard, navigator.mediaSession [0], that lets you do this in a web standard way. Unfortunatly, the only browser that implements it is Chrome on Android.
[0]: https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API https://developer.mozilla.org/en-US/docs/Web/API/Media_Sessi...