Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Nheko Reborn
nheko
Merge requests
!15
Video player enhancements
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Video player enhancements
video_player_enhancements
into
master
Overview
2
Commits
19
Pipelines
5
Changes
10
1 unresolved thread
Hide all comments
Merged
Joe Donofry
requested to merge
video_player_enhancements
into
master
3 years ago
Overview
2
Commits
19
Pipelines
5
Changes
5
1 unresolved thread
Hide all comments
Expand
Based on lurkki's updates:
https://github.com/Nheko-Reborn/nheko/pull/302
Refactor code into reusable components
Fix bugs as necessary and change some theming
Edited
3 years ago
by
Nicolas Werner
0
0
Merge request reports
Compare
version 4
version 4
435047b1
3 years ago
version 3
c5e8b2da
3 years ago
version 2
e3eb87cc
3 years ago
version 1
df17e4e2
3 years ago
master (base)
and
latest version
latest version
b7b4fd0e
19 commits,
3 years ago
version 4
435047b1
18 commits,
3 years ago
version 3
c5e8b2da
16 commits,
3 years ago
version 2
e3eb87cc
15 commits,
3 years ago
version 1
df17e4e2
14 commits,
3 years ago
Show latest version
5 files
+
103
−
100
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
resources/qml/delegates/PlayableMediaMessage.qml
+
25
−
31
Options
@@ -21,14 +21,13 @@ Item {
required
property
string
url
required
property
string
body
required
property
string
filesize
property
double
tempWidth
:
Math
.
min
(
parent
?
parent
.
width
:
undefined
,
originalWidth
<
1
?
400
:
originalWidth
)
property
double
tempHeight
:
tempWidth
*
proportionalHeight
property
double
divisor
:
isReply
?
4
:
2
property
bool
tooHigh
:
tempHeight
>
timelineRoot
.
height
/
divisor
property
double
tempWidth
:
Math
.
min
(
parent
?
parent
.
width
:
undefined
,
originalWidth
<
1
?
400
:
originalWidth
)
property
double
tempHeight
:
tempWidth
*
proportionalHeight
property
double
divisor
:
isReply
?
4
:
2
property
bool
tooHigh
:
tempHeight
>
timelineRoot
.
height
/
divisor
height
:
(
type
==
MtxEvent
.
VideoMessage
?
tooHigh
?
timelineRoot
.
height
/
divisor
:
tempHeight
:
80
)
+
fileInfoLabel
.
height
width
:
type
==
MtxEvent
.
VideoMessage
?
tooHigh
?
(
timelineRoot
.
height
/
divisor
)
/
proportionalHeight
:
tempWidth
:
250
height
:
(
type
==
MtxEvent
.
VideoMessage
?
tooHigh
?
timelineRoot
.
height
/
divisor
:
tempHeight
:
80
)
+
fileInfoLabel
.
height
width
:
type
==
MtxEvent
.
VideoMessage
?
tooHigh
?
(
timelineRoot
.
height
/
divisor
)
/
proportionalHeight
:
tempWidth
:
250
MxcMedia
{
id
:
mxcmedia
@@ -44,16 +43,14 @@ Item {
Rectangle
{
id
:
videoContainer
color
:
type
==
MtxEvent
.
VideoMessage
?
Nheko
.
colors
.
window
:
"
transparent
"
width
:
parent
.
width
height
:
parent
.
height
-
fileInfoLabel
.
height
TapHandler
{
onTapped
:
mediaControls
.
showControls
();
}
TapHandler
{
onTapped
:
mediaControls
.
showControls
()
}
Image
{
anchors.fill
:
parent
@@ -72,34 +69,31 @@ Item {
flushMode
:
VideoOutput
.
FirstFrame
}
}
}
MediaControls
{
id
:
mediaControls
anchors.left
:
content
.
left
anchors.right
:
content
.
right
anchors.bottom
:
fileInfoLabel
.
top
playingVideo
:
type
==
MtxEvent
.
VideoMessage
positionValue
:
mxcmedia
.
position
duration
:
mxcmedia
.
duration
mediaLoaded
:
mxcmedia
.
loaded
mediaState
:
mxcmedia
.
state
onPositionChanged
:
mxcmedia
.
position
=
position
onPlayPauseActivated
:
mxcmedia
.
state
==
MediaPlayer
.
PlayingState
?
mxcmedia
.
pause
()
:
mxcmedia
.
play
()
onLoadActivated
:
mxcmedia
.
eventId
=
eventId
}
MediaControls
{
id
:
mediaControls
anchors.left
:
content
.
left
anchors.right
:
content
.
right
anchors.bottom
:
fileInfoLabel
.
top
playingVideo
:
type
==
MtxEvent
.
VideoMessage
positionValue
:
mxcmedia
.
position
duration
:
mxcmedia
.
duration
mediaLoaded
:
mxcmedia
.
loaded
mediaState
:
mxcmedia
.
state
onPositionChanged
:
mxcmedia
.
position
=
position
onPlayPauseActivated
:
mxcmedia
.
state
==
MediaPlayer
.
PlayingState
?
mxcmedia
.
pause
()
:
mxcmedia
.
play
()
onLoadActivated
:
mxcmedia
.
eventId
=
eventId
}
// information about file name and file size
Label
{
id
:
fileInfoLabel
anchors.bottom
:
content
.
bottom
text
:
body
+
"
[
"
+
filesize
+
"
]
"
textFormat
:
Text
.
PlainText
elide
:
Text
.
ElideRight
Loading