Media Session API - Sample
Date: February 10th, 2017The Media Session API is currently only supported on Android devices using Chrome browser version 57. Microsoft Edge, Opera and Safari are working on implementing this API to their browsers. Firefox does not support it.
Note:
The sample integrates the WaveSurfer.js library which creates audio waveforms using WebAudio API. This sample is a work in progress and will be updated once more browsers support the API.
mediaSession api check:
if (navigator.mediaSession) {
console.log("Your browser supports the Media Session API");
}
Current Browser Support:
Links: WaveSurfer.jsMedia Session APIEdge Platform Status
See the Pen Media Session API - Sample by Enton Biba (@entonbiba) on CodePen.