Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_vimeo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_vimeo
Commits
fbb8ab4b
Commit
fbb8ab4b
authored
2 years ago
by
Matthias Adrowski
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/master' into feature_Upgrade-to-TYPO3-11
parents
73daa310
20b0048f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Feature upgrade to typo3 11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Resources/Public/JavaScript/sgVimeoLightbox.js
+6
-7
6 additions, 7 deletions
Resources/Public/JavaScript/sgVimeoLightbox.js
with
6 additions
and
7 deletions
Resources/Public/JavaScript/sgVimeoLightbox.js
+
6
−
7
View file @
fbb8ab4b
'
use strict
'
;
import
LightboxManager
from
'
lightboxManager
'
;
export
default
class
SgVimeoLightbox
{
/**
* Initializes the LightboxManager with the necessary parameters.
*/
...
...
@@ -12,13 +9,16 @@ export default class SgVimeoLightbox {
const
isMobile
=
window
.
matchMedia
(
'
(max-width: 679px)
'
).
matches
;
vimeoItems
.
forEach
((
item
)
=>
{
if
(
item
.
dataset
.
disableLightboxMobile
===
'
1
'
&&
isMobile
||
item
.
dataset
.
disableLightbox
===
'
1
'
&&
!
isMobile
)
{
if
(
(
item
.
dataset
.
disableLightboxMobile
===
'
1
'
&&
isMobile
)
||
(
item
.
dataset
.
disableLightbox
===
'
1
'
&&
!
isMobile
)
)
{
item
.
classList
.
remove
(
'
sg-vimeo-item
'
);
item
.
addEventListener
(
'
click
'
,
this
.
disableLightbox
.
bind
(
this
));
}
});
LightboxManager
.
init
({
type
:
'
video
'
,
glightbox
:
{
selector
:
'
.sg-vimeo-item
'
}
});
LightboxManager
.
init
({
type
:
'
video
'
,
glightbox
:
{
selector
:
'
.sg-vimeo-item
'
}
});
}
disableLightbox
(
event
)
{
...
...
@@ -35,7 +35,7 @@ export default class SgVimeoLightbox {
iframe
.
width
=
width
;
iframe
.
height
=
height
;
iframe
.
style
.
border
=
'
none
'
;
iframe
.
src
=
`https://player.vimeo.com/video/
${
videoId
}
?dnt=1`
;
iframe
.
src
=
`https://player.vimeo.com/video/
${
videoId
}
?dnt=1
&autoplay=1
`
;
iframe
.
allowFullscreen
=
true
;
item
.
replaceChild
(
iframe
,
videoImage
);
...
...
@@ -46,4 +46,3 @@ export default class SgVimeoLightbox {
return
splitUrl
[
splitUrl
.
length
-
1
];
}
}
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