-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Feature/video elements #1348
Conversation
|
Again, please rebase. 😉 |
|
ok ... which branch? |
|
Pull Requests for new features belong to the |
|
We just extend an existing feature ;-) |
|
This pull request has the |
|
Did I do it correctly with rebase? |
|
You are adding 15 (!) new fields to |
|
I will talk to @discordier and we will try ... |
|
I talked to @discordier and we can share the fields, but we adopted the fields from c7b4f38 - there's a prefix for "youtube" options. When we want to merge the options, the prefix should be removed, which will be a problem for future updates. We planed a default prefix like "video", but we were to late. So we have to make a update script for renaming the existing fields?! |
|
Should be one widget with multiple checkboxes I think. If this is possible. |
I think, this is not possible, because we already have 3 different CE's ... maybe in Contao 5 we can make only one CE |
|
Here's how I think that the fields should be:
So the following fields need to be removed:
If an element does not support one of the shared fields, we simply hide it. |
|
@frontendschlampe What's the status on this? |
|
yes ... I don't forget it! I hope, that I will work on it with @discordier this week ... not later than the beginning of next week. |
| @@ -103,7 +103,7 @@ | |||
| // Palettes | |||
| 'palettes' => array | |||
| ( | |||
| '__selector__' => array('type', 'addImage', 'sortable', 'useImage', 'overwriteMeta', 'protected'), | |||
| '__selector__' => array('type', 'addImage', 'sortable', 'useImage', 'overwriteMeta', 'protected', 'youtubeResponsive', 'vimeoResponsive'), | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be 'playerResponsive', doesn't it?
|
I wonder if it makes sense to have the video-related CSS code in a separate file (see contao-components/contao#10)? The image-related CSS code is in the @contao/developers /cc |
|
Fine for me. Is there already a PR for migrations because like this it's a BC break atm. |
|
And I wonder if we should drop autoplay completely. It's always been a bad idea and browser vendors are finally starting to block them automatically so it has no purpose anymore anyway. |
Really? I see a lot of background videos playing automatically. And that sounds like a useful case? |
|
Autoplay with sound is forbidden since a long time. If you want to have autoplay, you also have to play your video muted. But I wouldn't drop autoplay. |
I put in a separate one, because you need it only if you want to use responsive video. If you don't want to use responsive video, you don't have to use any separate css. |
|
But following this logic, we would also have to remove the responsive images code from the |
So it's not in the layout.css but in the responsive.css - I think the best would be, we add it to responsive.css, isn't it? So all responsive styles are at one place! |
|
As I e.g. do not use Contao FE CSS for me it's nice to have this CSS per Checkbox. But I also can put this CSS into my own CSS file like I do with responsive images img {
max-width: 100%;
height: auto;
}
/* default 16:9 aspect ratio */
.video-wrapper {
position: relative;
padding-bottom: 56.25%;
height: 0;
}
/* 21:9 aspect ratio */
.video-wrapper.ar219 {
padding-bottom: 42.8571%;
}
/* 16:10 aspect ratio */
.video-wrapper.ar1610 {
padding-bottom: 62.5%;
}
/* 4:3 aspect ratio */
.video-wrapper.ar43 {
padding-bottom: 75%;
}
/* 1:1 aspect ratio */
.video-wrapper.ar11 {
padding-bottom: 100%;
}
/* span iframe */
.video-wrapper > * {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
} |
|
Thank you @frontendschlampe. |
|
This commit brings back the problem with |
|
Removed in eaaca08. |
That's interesting ... then YouTube and Vimeo providing invalid code. ;-) |
|
IDTS. I may have copied it at some point. |
<iframe width="560" height="315" src="https://www.youtube.com/embed/Rw8iMnkqvwk" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>Is original embed code from YouTube. ;-) |
|
😳 |
|
I guess they provide it for regular everyday normal users that only copy-paste the code, so that they are not confused with the frame border which is default styling for some browsers. The W3C clearly says it's an error however: … and even points to the Wikipedia page that provides a list of equivalents. |
Description ----------- See #1307 ### Before <img width="568" alt="" src="https://user-images.githubusercontent.com/1192057/74720064-718c8400-5235-11ea-81f6-3d164fbfc22e.png"> ### After <img width="592" alt="" src="https://user-images.githubusercontent.com/1192057/74720079-78b39200-5235-11ea-93b1-9f310e1e4ca9.png"> Commits ------- c9c7671f Correctly align the wizard icon (see #1307)

add some more options for audio and video elements:
Audio/Video:
playsinlineto prevent automatic fullscreen mode on iPhone devices when playback beginsYouTube
Vimeo
Many thanks to my customers for their financial support of this pr.