export function establishPlayerBridge(_0x1857dc){const _0x29ae12=Symbol['for']('react-sync.player-control.bridge'),_0x19888d='react-sync:player-driver';if(window[_0x29ae12]){window['postMessage']({'source':_0x19888d,'action':'READY'},'*');return;}const _0x3c77e0=_0x813839=>{if(_0x813839['source']!==window||!_0x813839['data']||_0x813839['data']['source']!=='react-sync:content-script')return;const _0x17a3b7=_0x1857dc['getPlayer']();if(!_0x17a3b7)return;const {action:_0x409aab,value:_0x265fe6}=_0x813839['data'];try{if(_0x409aab==='SEEK')_0x1857dc['seek'](_0x17a3b7,_0x265fe6);else{if(_0x409aab==='PAUSE')_0x1857dc['pause'](_0x17a3b7);else _0x409aab==='PLAY'&&_0x1857dc['play'](_0x17a3b7);}}catch(_0x2a760e){console['error'](_0x1857dc['name']+'\x20Sync\x20API\x20Error:',_0x2a760e);}};window['addEventListener']('message',_0x3c77e0),window[_0x29ae12]=_0x3c77e0,window['postMessage']({'source':_0x19888d,'action':'READY'},'*'),console['log'](_0x1857dc['name']+'\x20Player\x20Bridge\x20Established');}