Skip to content

First version of allowing a video to play on the background of the lo… - #1

Open
wsg-media wants to merge 3 commits into
pixl8:stablefrom
wsg-media:admin-login-video-background
Open

First version of allowing a video to play on the background of the lo…#1
wsg-media wants to merge 3 commits into
pixl8:stablefrom
wsg-media:admin-login-video-background

Conversation

@wsg-media

Copy link
Copy Markdown

…gin screen

Comment thread handlers/admin/Login.cfc

public string function backgroundVideo( event, rc, prc, args={} ) {
var bgVideo = getSystemSetting( "admin-login-security", "video_background" );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should put in a check here, rather than in the view, to see if the bgVideo is defined, and if not just return an empty string.

</cfscript>

<cfif args.bgVideo.len()>
<div class="vimeo-wrapper">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vimeo-wrapper is a bit specific, if it could also be a YouTube video. Maybe something more generic like login-video-wrapper

<form i18nBaseUri="system-config.admin-login-security:" >
<tab id="display" sortorder="30">
<fieldset id="background" sortorder="10">
<field sortorder="10" name="video_background" control="textinput" required="false" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe set this as a url input?


.login-layout {

.vimeo-wrapper {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments in the view on naming of this class

width: 100vw;
height: 56.25vw;
min-height: 100vh;
min-width: 177.77vh;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all locked to the video being 16:9 ratio.

Woiuld recommend trying the aspect-ratio CSS property: https://caniuse.com/mdn-css_properties_aspect-ratio

So, lose the width and height, have min-width and min-height as 100vw and 100vh, and then set the aspect ratio directly in the HTML of the iframe, so it could be pulled from a setting alongside the video URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants