"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[543],{59543:function(e,r,t){t.r(r);var n=t(57437),l=t(2265),u=t(67739),c=t.n(u),f=t(75613),s=t.n(f);function o(e,r,t){if(s().isSupported()){t.flv&&(t.flv.destroy(),t.flv=null);let n=s().createPlayer({type:"flv",url:r});t.flv=n,t.on("destroy",()=>{t.flv&&(t.flv.destroy(),t.flv=null)}),n.attachMediaElement(e),n.load()}else t.notice.show="Unsupported playback format: flv"}r.default=e=>{let{url:r,height:t="100%",width:u="100%"}=e,f=(0,l.useRef)(null),s=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(f.current){try{s.current&&(s.current.destroy(),s.current=null),r.endsWith(".flv")?s.current=new(c())({container:f.current,url:r,type:"flv",customType:{flv:o},autoSize:!0,fullscreen:!0,fullscreenWeb:!0,autoOrientation:!0,plugins:[]}):s.current=new(c())({container:f.current,url:r,autoSize:!0,fullscreen:!0,fullscreenWeb:!0,autoOrientation:!0,plugins:[]})}catch(e){console.error("播放器初始化失败:",e)}return()=>{s.current&&(s.current.destroy(),s.current=null)}}},[r,t,u]),(0,n.jsx)("div",{ref:f,style:{width:u,height:t}})}}}]);