initPlayer static method

String initPlayer()

Implementation

static String initPlayer() {
  return "((w)=>{const p=(document.querySelector('svg')||{}).svgatorPlayer;if(!p||!w.SVGatorFlutterChannel){return}const e=['reverse','pause','restart','stop','end','play'];const _map=()=> e.forEach(function(e){p.on(e,function(o){w.SVGatorFlutterChannel.postMessage(JSON.stringify({'event':e,'offset':o}))})});if(p.totalTime){_map()}else{p.ready(_map)}})(window);";
}