fix nplayer url not working when protocol is included (#620)

This commit is contained in:
aidenlx
2022-04-26 21:42:41 +08:00
committed by GitHub
parent 26945f554e
commit 152380bd05
+1 -1
View File
@@ -164,7 +164,7 @@ const VideoPreview: FC<{ file: OdFileObject }> = ({ file }) => {
btnImage="/players/potplayer.png" btnImage="/players/potplayer.png"
/> />
<DownloadButton <DownloadButton
onClickCallback={() => window.open(`nplayer-http://${getBaseUrl()}${videoUrl}`)} onClickCallback={() => window.open(`nplayer-http://${window?.location.hostname ?? ""}${videoUrl}`)}
btnText="nPlayer" btnText="nPlayer"
btnImage="/players/nplayer.png" btnImage="/players/nplayer.png"
/> />