PageSourceSearch

https://accessmedia.nz/v11.1_Live/js/Player.CS17LyIT.js

js accessmedia.nz collected 2026-10-03 22:11:20 UTC 9,171 bytes, 1 lines download raw bytes

1import{A as O,u as q,d as K,e as m,h as w,z as Q,o as i,c as r,a,q as W,F as X,f as Y,t as b,s as T,v as E,_ as Z,g as ee,j as te,H as ae,E as oe,l as V,p as se,x as le,G as R}from"./index.0asgyqvA.js";import{E as ne}from"./EpisodePlayer.BRfbWF3l.js";import{S as ie}from"./SkeletonLoader.dvqrKKUo.js";import{f as H,i as re}from"./format.BnjGCzBc.js";import{E as de}from"./ErrorHandling.BxheY8y_.js";import{u as z}from"./metaUtils.ipqBNsLl.js";import{d as ce}from"./default-image.jntmyUdW.js";import"./_commonjsHelpers.BosuxZz1.js";const ue={class:"row mt-4"},pe={class:"mx-auto"},me={key:1},ve={key:0,class:"row"},ye={key:1},ge={class:"col-12"},fe={class:"p-0 m-0"},he={class:"text-xs p-0 m-0"},_e={class:"col-6"},Pe=["onClick"],we={class:"material-icons","aria-hidden":"true"},be={class:"text-primary ms-2"},Ee={class:"col-6 text-end"},$e=["onClick"],De=["title","onClick"],N="https://ondemand.accessmedia.nz",Ie=O({__name:"iframeEpisodes",props:{id:[String,Boolean],headingId:{type:String},collapse:{type:String},title:{type:String},description:{type:String}},emits:["episode-play","toggle-play-pause"],setup(G,{emit:D}){const e=D,c=q(),S=K(),x=m(()=>c.selectedStation),g=m(()=>c.selectedProgramme),v=m(()=>c.episodes),y=w(!1),d=w(null);Q(()=>g.value?.ID,s=>{s&&(y.value=!0,c.fetchProgrammeEpisodes(s).finally(()=>{y.value=!1}),c.fetchProgrammeById(s))});const f=s=>{navigator.clipboard.writeText(s).then(()=>{alert("Episode link Copied to clipboard."),console.log("Episode link copied to clipboard")}).catch(l=>{console.error("Error copying text to clipboard:",l)})},_=s=>{if(typeof window>"u")return"";const l=S.resolve({name:"episode",params:{EID:s}});return new URL(l.href,window.location.origin).toString()},u=s=>H(new Date(s),"dd/M/yyyy h:mm aaaa").replace("AM","a.m.").replace("PM","p.m."),I=s=>{const l=`/StationFolder/${x.value?.Folder}/`,n=`${N}${l}${s.MediaFile}`;window.open(n,"_blank");const p=document.createElement("a");p.href=n,p.download=s.Title||"download",document.body.appendChild(p),p.click(),document.body.removeChild(p)},$=s=>{if(!s.PublishDate)return!1;const l=new Date(s.PublishDate).getTime(),n=new Date().getTime(),p=7*24*60*60*1e3;return n-l<=p},C=s=>{if(d.value===s.ID)e("toggle-play-pause"),c.isPlaying=!c.isPlaying;else{const l=`/StationFolder/${x.value?.Folder}/`,p=`${N}${l}${s.MediaFile}`.replace(/ /g,"%20");c.setCurrentEpisode({...s,url:p},!0),e("episode-play"),d.value=s.ID,c.isPlaying=!0,e("confirm-play")}},F=s=>d.value===s.ID&&c.isPlaying,k=w(5),B=m(()=>v.value.slice(0,k.value)),U=m(()=>v.value.length>k.value),L=()=>{k.value+=5};return(s,l)=>(i(),r("div",ue,[a("div",pe,[y.value?(i(),W(ie,{key:0,rows:5,layout:"list"})):(i(),r("div",me,[v.value.length===0?(i(),r("div",ve,l[0]||(l[0]=[a("div",{class:"col-12"},[a("h4",null,"No episodes available")],-1)]))):(i(),r("div",ye,[l[4]||(l[4]=a("h4",null,"All Episodes",-1)),(i(!0),r(X,null,Y(B.value,(n,p)=>(i(),r("div",{key:p,class:"row"},[a("div",ge,[a("h5",fe,b(n.Title),1),a("p",he," Published: "+b(u(n.PublishDate)),1),a("p",null,b(n.Description),1)]),a("div",_e,[a("button",{onClick:T(M=>C(n),["stop"]),type:"button",class:"btn bg-gradient-primary p-0 epIcons","aria-label":"Play episode"},[a("i",we,b(F(n)?"chevron_right":"play_arrow"),1)],8,Pe),a("span",be,b(F(n)?"Now Playing":""),1)]),a("div",Ee,[$(n)?(i(),r("a",{key:0,tabindex:"0",onClick:T(M=>I(n),["stop"]),class:"text-primary mx-2 cursor-pointer","aria-label":"download episode",title:"download episode"},l[1]||(l[1]=[a("i",{class:"fa-regular fa-circle-down fa-xl"},null,-1)]),8,$e)):E("",!0),a("a",{tabindex:"0",title:"Copy episode link "+_(n.ID),onClick:T(M=>f(_(n.ID)),["stop"]),class:"text-primary mx-2 cursor-pointer","aria-label":"copy podcast link to clipboard"},l[2]||(l[2]=[a("i",{class:"fa fa-clipboard fa-xl"},null,-1)]),8,De)]),l[3]||(l[3]=a("hr",null,null,-1))]))),128)),U.value?(i(),r("button",{key:0,type:"button",class:"btn btn-dark mb-1","aria-label":"Load more episodes",onClick:L}," Load More Episodes ")):E("",!0)]))]))])]))}}),ke=Z(Ie,[["__scopeId","data-v-45c9e50e"]]),Se={key:0,class:"col-12"},xe={key:1,class:"col-12"},Fe={key:2,class:"container"},Me={class:"row mx-3"},Te={class:"col-12"},Ce={key:0,class:"video-container"},Be={class:"col-12"},Ue={key:0,class:"row mt-2"},Le={class:"col-2"},Ve={class:"imgHolder"},Re=["src","alt"],ze={class:"col-9"},Ne={key:0,class:"text-xs p-0 m-0"},Ae={class:"py-2 px-0 m-0"},Oe={class:"col-1 text-end"},qe={class:"m-3"},He={class:"col-12"},Ge={key:0},A="https://ondemand.accessmedia.nz",et=O({__name:"Player",setup(G){const D=ee(),e=q(),c=m(()=>D.params.PID?.toString()),S=m(()=>D.query.EID),x=m(()=>D.query.audioOnlyMode==="true"),g=w(!0),v=w(null),y=w(!1),d=w(!1),f=w(null),_=m(()=>e.selectedProgramme||{}),u=m(()=>e.selectedEpisode||{}),I=m(()=>e.selectedStation||{}),$=o=>o?/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(o.trim()):!1,C=async o=>{if(!$(o)){d.value=!0,f.value="Programme",v.value="Invalid programme ID in URL.",g.value=!1;return}g.value=!0,v.value=null,d.value=!1,f.value=null;try{if(o){await e.fetchProgrammeById(o),await e.fetchProgrammeEpisodes(o);const t=e.selectedProgramme?.Station;t&&t!=="00000000-0000-0000-0000-000000 000000"&&await e.fetchStationById(t)}}catch(t){console.error("Error fetching programme data:",t),v.value="Failed to load programme data. Please try again.",d.value=!0,f.value="Programme",y.value=!1}finally{g.value=!1}d.value||z({title:`${_.value.Title}`,description:`${_.value.Short_Description}`,image:`https://images.accessmedia.nz/StationFolder/${I.value?.Folder}/Images/${_.value?.Image}`})},F=async o=>{if(!$(o)){d.value=!0,f.value="Episode",v.value="Invalid or missing episode ID in URL.",g.value=!1,y.value=!1;return}g.value=!0,v.value=null,d.value=!1,f.value=null;try{if(o){await e.fetchEpisodeById(o);const t=e.selectedEpisode?.Station;t&&t!=="00000000-0000-0000-0000-000000000000"&&await e.fetchStationById(t),y.value=!0,await e.fetchProgrammeById(u.value.Programme),await e.fetchStationById(_.value.Station);const P=e.selectedStation?.Folder,h=u.value.MediaFile;if(P&&h){const j=`/StationFolder/${P}/`,J=`${A}${j}${h}`.replace(/ /g,"%20");await R(),e.setCurrentEpisode({...u.value,url:J},!1)}}}catch(t){console.error("Error fetching episode data:",t),v.value="Failed to load episode data. Please try again.",d.value=!0,f.value="Episode",y.value=!1}finally{g.value=!1}d.value||z({title:`${u.value.Title}`,description:`${u.value.Description}`,image:`https://images.accessmedia.nz/StationFolder/${I.value?.Folder}/Images/${u.value?.Image}`})},k=()=>{y.value=!0,R(()=>{e.autoplay=!0})},B=()=>{y.value&&(e.autoplay=!e.autoplay,e.isPlaying=!e.isPlaying)},U=o=>{const t=new Date(o);return re(t)?H(t,"dd/M/yyyy h:mm aaaa").replace("AM","a.m.").replace("PM","p.m."):"Invalid date"},L=o=>{const t=`/StationFolder/${I.value?.Folder}/`,P=`${A}${t}${o.MediaFile}`;window.open(P,"_blank");const h=document.createElement("a");h.href=P,h.download=o.Title||"download",document.body.appendChild(h),h.click(),document.body.removeChild(h)},s=o=>
1{if(!o.PublishDate)return!1;const t=new Date(o.PublishDate).getTime(),P=new Date().getTime(),h=7*24*60*60*1e3;return P-t<=h},l=m(()=>!e.selectedProgramme||!e.selectedProgramme.Image?"":`https://images.accessmedia.nz/StationFolder/${e.selectedStation?.Folder}/Images/${e.selectedProgramme.Image}`.replace(/ /g,"%20")),n=ce,p=o=>{o.target.src=n};te(()=>{const o=c.value,t=S.value;o&&$(o)?C(o):t&&$(t)?F(t):(d.value=!0,f.value="Episode",v.value="Invalid or incomplete episode link.",g.value=!1),document.body.classList.add("player-body")}),ae(()=>{document.body.classList.remove("player-body")}),oe(()=>{e.selectedProgramme=null,e.selectedEpisode=null,e.episodes=[],e.selectedStation=null,e.currentEpisode=null,e.autoplay=!1,e.isPlaying=!1,e.footerAutoplay=!1,e.showFooterPlayer=!1});const M=()=>{setTimeout(()=>{const o=document.getElementById("player-section");o&&o.scrollIntoView({behavior:"smooth"})},300)};return(o,t)=>g.value?(i(),r("div",Se,t[1]||(t[1]=[a("p",null,"Loading programme details...",-1)]))):d.value?(i(),r("div",xe,[V(de,{type:f.value||"Programme"},null,8,["type"])])):(i(),r("div",Fe,[t[4]||(t[4]=a("div",{id:"player-section"},null,-1)),a("div",Me,[a("div",Te,[y.value?(i(),r("div",Ce,[V(ne,{class:"videoPlayer",audioOnlyMode:x.value},null,8,["audioOnlyMode"])])):E("",!0)]),a("div",Be,[S.value?(i(),r("div",Ue,[a("div",Le,[a("div",Ve,[a("img",{src:l.value||se(n),alt:_.value.Title,class:"img-raised rounded",onError:p},null,40,Re)])]),a("div",ze,[a("p",null,[t[2]||(t[2]=le("Programme: ")),a("b",null,b(_.value.Title),1)]),u.value.PublishDate?(i(),r("p",Ne," Episode Published: "+b(U(u.value.PublishDate)),1)):E("",!0),a("p",Ae,b(u.value.Description),1)]),a("div",Oe,[a("p",qe,[s(u.value)?(i(),r("a",{key:0,tabindex:"0",onClick:t[0]||(t[0]=T(P=>L(u.value),["stop"])),class:"text-primary cursor-pointer","aria-label":"download episode",title:"download episode"},t[3]||(t[3]=[a("i",{class:"fa-regular fa-circle-down fa-xl"},null,-1)]))):E("",!0)])])])):E("",!0)]),a("div",He,[c.value?(i(),r("div",Ge,[V(ke,{class:"listBox",onEpisodePlay:k,onTogglePlayPause:B,onConfirmPlay:M})])):E("",!0)])])]))}});export{et as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.