Skip to content

Commit

Permalink
fixed streaming long videos, more hoster
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Nov 18, 2022
1 parent 0042489 commit 3b35291
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {
applicationId = "de.datlag.burningseries"
minSdk = Configuration.minSdk
targetSdk = Configuration.targetSdk
versionCode = 320
versionName = "3.2.0"
versionCode = 321
versionName = "3.2.1"

multiDexEnabled = true
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import de.datlag.burningseries.extend.AdvancedFragment
import de.datlag.burningseries.helper.lazyMutable
import de.datlag.burningseries.ui.connector.BackPressedDispatcher
import de.datlag.burningseries.ui.connector.KeyEventDispatcher
import de.datlag.burningseries.ui.view.CustomControl
import de.datlag.burningseries.viewmodel.BurningSeriesViewModel
import de.datlag.burningseries.viewmodel.SettingsViewModel
import de.datlag.burningseries.viewmodel.VideoViewModel
Expand Down Expand Up @@ -120,7 +119,6 @@ class VideoFragment : AdvancedFragment(R.layout.fragment_video), PreviewLoader,
setSeekForwardIncrementMs(10000)
setPauseAtEndOfMediaItems(true)
setMediaSourceFactory(DefaultMediaSourceFactory(safeContext, extractorFactory))
setLoadControl(CustomControl())
}.build().apply {
addListener(this@VideoFragment)
playWhenReady = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class CustomControl(
const val DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS = 5000

/** A default size in bytes for a video buffer. */
const val DEFAULT_VIDEO_BUFFER_SIZE = 8000 * C.DEFAULT_BUFFER_SEGMENT_SIZE
const val DEFAULT_VIDEO_BUFFER_SIZE = 4096 * C.DEFAULT_BUFFER_SEGMENT_SIZE

/** A default size in bytes for an audio buffer. */
const val DEFAULT_AUDIO_BUFFER_SIZE = 200 * C.DEFAULT_BUFFER_SEGMENT_SIZE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class VideoScraper {

JsUnpacker.unpack(doc.select("script").map { it.data().trim() }).forEach {
srcList.addAll(regex.findAll(it).map { result -> result.value })
srcList.addAll(regexWithQueryParams.findAll(it).map { result -> result.value })
if (it.contains("video", true)) {
val dllRegex = Regex(
"http(s?)://\\S+\\.(dll)",
Expand Down

0 comments on commit 3b35291

Please sign in to comment.