Skip to content
Snippets Groups Projects
Commit f00a10aa authored by Raphael Klug's avatar Raphael Klug
Browse files

Update reg.js

parent 44b375d8
Branches
No related tags found
No related merge requests found
......@@ -2,8 +2,8 @@ export default class Req{
constructor(mode="s"){
this.mode=mode=mode==="s"?0:1;
this.req={}
const events=['nexttrack','previoustrack','pause','play','stop','seekbackward','seekforward','seekto','skipad']
events.forEach((e)=>{navigator.mediaSession.setActionHandler(e,(a)=>{a.preventDefault();this.req[e].forEach((e)=>{e(a);});return false;});})
const events=['nexttrack','previoustrack','pause','play','stop','seekbackward','seekforward','seekto']//,'skipad']
events.forEach((e)=>{navigator.mediaSession.setActionHandler(e,(a)=>{this.req[e].forEach((e)=>{e(a);});return false;});})
events.push("metachange")
this.events=events
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment