Skip to content

Commit

Permalink
Add pre-resolve network feature and HLS patching
Browse files Browse the repository at this point in the history
- Introduced a new button and tooltip for pre-resolve network settings in `BrtPlayer.vue`.
- Added `HlsPatched` class to handle custom HLS loading logic.
- Implemented `resolveMasterManifestWorker` for resolving master manifests in a web worker.
- Added utility functions for segment handling and network requests.
- Updated dependencies in `package.json` to include `p-limit` and `ts-retry`.
- Configured server URL in `capacitor.config.json` for development.
  • Loading branch information
tachibana-shin committed Aug 2, 2024
1 parent 95a323f commit 3e55f90
Show file tree
Hide file tree
Showing 16 changed files with 581 additions and 151 deletions.
Binary file modified bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"eruda2": "0.0.2-b8",
"fb-comments-web": "^0.0.13",
"group-array": "^1.0.0",
"hls.js": "1.5.10",
"hls.js": "^1.5.13",
"htmlparser2": "^8.0.1",
"idb-keyval": "^6.2.1",
"iso-639-1": "^2.1.15",
Expand All @@ -72,6 +72,7 @@
"jwplayer8": "0.0.1-b1",
"lz-string": "^1.4.4",
"message-port-api": "^0.0.5",
"p-limit": "^6.1.0",
"path-browserify": "^1.0.1",
"pinia": "^2.0.29",
"pinia-plugin-persistedstate": "^3.0.2",
Expand All @@ -87,6 +88,7 @@
"supabase": "^1.183.5",
"swiper": "^8.4.6",
"ts-md5": "^1.3.1",
"ts-retry": "^4.2.5",
"ua-parser-js": "^1.0.35",
"uuid": "^9.0.0",
"vn-remove-accents": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
},
"bundledWebRuntime": false,
"webDir": "www",
"server": {}
"server": {
"url": "http://10.0.5.2:9500"
}
}
22 changes: 11 additions & 11 deletions src-capacitor/android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/android/capacitor')
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')

include ':capacitor-community-firebase-analytics'
project(':capacitor-community-firebase-analytics').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor-community/firebase-analytics/android')
project(':capacitor-community-firebase-analytics').projectDir = new File('../node_modules/@capacitor-community/firebase-analytics/android')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/app/android')
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')

include ':capacitor-browser'
project(':capacitor-browser').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/browser/android')
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')

include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/device/android')
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')

include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/filesystem/android')
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')

include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/haptics/android')
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')

include ':capacitor-preferences'
project(':capacitor-preferences').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/preferences/android')
project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android')

include ':capacitor-share'
project(':capacitor-share').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/share/android')
project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android')

include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/status-bar/android')
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')

include ':hugotomazi-capacitor-navigation-bar'
project(':hugotomazi-capacitor-navigation-bar').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@hugotomazi/capacitor-navigation-bar/android')
project(':hugotomazi-capacitor-navigation-bar').projectDir = new File('../node_modules/@hugotomazi/capacitor-navigation-bar/android')
Binary file modified src-capacitor/bun.lockb
100644 → 100755
Binary file not shown.
4 changes: 3 additions & 1 deletion src-capacitor/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
},
"bundledWebRuntime": false,
"webDir": "www",
"server": {}
"server": {
"url": "http://10.0.5.2:9500"
}
}
3 changes: 1 addition & 2 deletions src-capacitor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git.shin.animevsub",
"version": "1.8.39",
"version": "1.8.42",
"description": "Watch Anime without advertising, free, private.",
"author": "Tachibana Shin <[email protected]>",
"private": true,
Expand All @@ -22,7 +22,6 @@
"@capacitor/share": "^5.0.8",
"@capacitor/status-bar": "^5.0.8",
"@hugotomazi/capacitor-navigation-bar": "^3.0.0",
"@jcesarmobile/ssl-skip": "^0.2.0",
"cordova-plugin-screen-orientation": "^3.0.4"
}
}
4 changes: 2 additions & 2 deletions src/apis/runs/ajax/player-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function PlayerLink(config: {
link,
backuplinks: "1",
}).then(async ({ data }) => {

if (!data) throw new Error("unknown_error")
type Writeable<T> = {
-readonly [P in keyof T]: T[P] extends object ? Writeable<T[P]> : T[P]
Expand All @@ -59,7 +59,7 @@ export function PlayerLink(config: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any, promise/no-nesting
;(self as unknown as any).hn ??= await App.getInfo().then(
(info) => info.id
)
).catch(() => 'git.shin.animevsub')

Check warning on line 62 in src/apis/runs/ajax/player-link.ts

View workflow job for this annotation

GitHub Actions / Run eslint scanning

Avoid nesting promises

Check warning on line 62 in src/apis/runs/ajax/player-link.ts

View workflow job for this annotation

GitHub Actions / Run eslint scanning

Strings must use doublequote
await init()

try {
Expand Down
Loading

0 comments on commit 3e55f90

Please sign in to comment.