Skip to content

Commit

Permalink
🐛 [epgs] 末尾スラッシュが2重になると再生できない環境がある(#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ci7lus committed Oct 6, 2021
1 parent 8ba52bd commit dcc5560
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@types/node": "^16.10.2",
"@types/postcss-import": "^12.0.1",
"@types/react-table": "^7.7.5",
"@types/url-join": "^4.0.1",
"@types/webpack": "^4",
"autoprefixer": "^10.3.6",
"css-loader": "^5",
Expand Down Expand Up @@ -70,6 +71,7 @@
"react-use": "^17.3.1",
"recoil": "^0.4.1",
"reconnecting-websocket": "^4.4.0",
"url-join": "^4.0.1",
"yaml": "^1.10.2"
},
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/miraktest-epgs/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios"
import urljoin from "url-join"
import type { EPGSProgramRecord, EPGSChannel } from "./types"

export class EPGStationAPI {
Expand Down Expand Up @@ -104,6 +105,6 @@ export class EPGStationAPI {
return data.records
}
getVideoUrl({ videoId }: { videoId: number }) {
return `${this.baseUrl.href}/api/videos/${videoId}`
return urljoin(this.baseUrl.href, `api/videos/${videoId}`)
}
}
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,11 @@
dependencies:
source-map "^0.6.1"

"@types/url-join@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@types/url-join/-/url-join-4.0.1.tgz#4989c97f969464647a8586c7252d97b449cdc045"
integrity sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ==

"@types/webpack-sources@*":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-3.2.0.tgz#16d759ba096c289034b26553d2df1bf45248d38b"
Expand Down Expand Up @@ -7671,6 +7676,11 @@ urix@^0.1.0:
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=

url-join@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7"
integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==

url-parse-lax@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
Expand Down

0 comments on commit dcc5560

Please sign in to comment.