MCPcopy Create free account
hub / github.com/Moebytes/Frame-Player / openLink

Function openLink

components/VideoPlayer.tsx:138–146  ·  view source on GitHub ↗
(event: any, link: string)

Source from the content-addressed store, hash-verified

136 upload()
137 }
138 const openLink = async (event: any, link: string) => {
139 if (link) {
140 let video = link.replace(/\?.*$/, "")
141 if (link.includes("youtube.com") || link.includes("youtu.be")) {
142 video = await window.ipcRenderer.invoke("download-yt-video", link)
143 }
144 upload(video)
145 }
146 }
147 const triggerDownload = () => {
148 download()
149 }

Callers

nothing calls this directly

Calls 1

uploadFunction · 0.85

Tested by

no test coverage detected