Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grayjay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoStreaming
Grayjay
Commits
fc5a8d95
Verified
Commit
fc5a8d95
authored
9 months ago
by
Kai DeLorenzo
Browse files
Options
Downloads
Patches
Plain Diff
disable download button for widevine sources
parent
aceab7b4
No related branches found
No related tags found
1 merge request
!19
disable download button for widevine sources
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/com/futo/platformplayer/helpers/VideoHelper.kt
+2
-1
2 additions, 1 deletion
.../main/java/com/futo/platformplayer/helpers/VideoHelper.kt
with
2 additions
and
1 deletion
app/src/main/java/com/futo/platformplayer/helpers/VideoHelper.kt
+
2
−
1
View file @
fc5a8d95
...
...
@@ -13,6 +13,7 @@ import com.futo.platformplayer.api.media.models.streams.IVideoSourceDescriptor
import
com.futo.platformplayer.api.media.models.streams.VideoUnMuxedSourceDescriptor
import
com.futo.platformplayer.api.media.models.streams.sources.IAudioSource
import
com.futo.platformplayer.api.media.models.streams.sources.IAudioUrlSource
import
com.futo.platformplayer.api.media.models.streams.sources.IAudioUrlWidevineSource
import
com.futo.platformplayer.api.media.models.streams.sources.IHLSManifestAudioSource
import
com.futo.platformplayer.api.media.models.streams.sources.IHLSManifestSource
import
com.futo.platformplayer.api.media.models.streams.sources.IVideoSource
...
...
@@ -44,7 +45,7 @@ class VideoHelper {
}
fun
isDownloadable
(
source
:
IVideoSource
)
=
source
is
IVideoUrlSource
||
source
is
IHLSManifestSource
;
fun
isDownloadable
(
source
:
IAudioSource
)
=
source
is
IAudioUrlSource
||
source
is
IHLSManifestAudioSource
;
fun
isDownloadable
(
source
:
IAudioSource
)
=
(
source
is
IAudioUrlSource
||
source
is
IHLSManifestAudioSource
)
&&
source
!
is
IAudioUrlWidevineSource
fun
selectBestVideoSource
(
desc
:
IVideoSourceDescriptor
,
desiredPixelCount
:
Int
,
prefContainers
:
Array
<
String
>)
:
IVideoSource
?
=
selectBestVideoSource
(
desc
.
videoSources
.
toList
(),
desiredPixelCount
,
prefContainers
);
fun
selectBestVideoSource
(
sources
:
Iterable
<
IVideoSource
>,
desiredPixelCount
:
Int
,
prefContainers
:
Array
<
String
>)
:
IVideoSource
?
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment