Flowplayer background video plugin
flowplayer / flowplayer-background Goto Github PK
View Code? Open in Web Editor NEWFlowplayer background video plugin
License: MIT License
Flowplayer background video plugin
License: MIT License
The correct place is on ready. Can't be imlemented though because of flowplayer/flowplayer#1264.
Note re 2: api.volume() and api.volume one progress with engine plugins (hlsjs, dashjs) come too early (video tag not available) and have no effect. To be investigated.
conf.loop, conf.muted, api.volume() have no effect on boot, remove.
IE8 errors out when rgba
CSS rule is dynamically added as style
attribute.
Try parsing background.mask
config (default: rgba(255, 255, 255, 0.7)
):
rgb
background-color and opacity filter directivesie http://demos.flowplayer.org/plugins/background.html
Reports:
Some cases background video plugin is perfect to add "animation" in to website. If animation is complex then it is easier to add as a video, but bg video plugin does not allow setting 'loop' as false.
By default loop should be true.
"Stop animation when it finish."
Hi,
I noticed that background video plugin is setting min-height for the parent element, why?
// Make sure container element grows to at least video size
var container = root.parentNode;
function setMinHeight() {
common.css(container, 'min-height', common.height(root) + 'px');
}
setMinHeight();
bean.on(window, 'resize', setMinHeight);
});
I noticed this because that breaks things on my setup. I also noticed that nothing gets broken if I remove 'min-height' from the element.
I'm using Bootstrap responsive embed in my setup and that is taking care of the video size.
I'm also using Reveal.js which applies 'zoom' or 'transform: scale()' for the "root" element on my setup and it seems that setting that 'min-height' when scale() is applied breaks things.
On Chrome zoom: 1.36641 gives min-height of 669.994px which is ok, but Firefox and IE are using scale and scale(1.36641) gives min-height of 915.5; which is not ok. Note that scale and zoom are identical, but height calculation gives 245,4px difference.
I cannot provide jsfiddle, but I attach screenshots from the case. There is background image behind the background video which is showing up on Firefox.
My opinion is that background video plugin should not take care of the container size, instead its function is to take care that controls are not showing up, its playing video automatically and handling mute (+ overlay). Developer should take care of the container size and whether video should keep aspect ratio or be stretched. But this is only my opinion :)
I'll fix for now my setup using min-widht: auto!important; to override that inline style.
If splash image is configured for the player, background video plugin should use that image as still image for devices which cannot autoplay videos.
Configuring it in this way is not good when you need to make it dynamic (change per video):
#background.is-loading {
background-color: #9cf;
background-image: url(//cdn.flowplayer.org/202777/210503-snap.jpg);
}
Also using already existing way makes documentation more simple.
npm install flowplayer-background
Registry returned 404 for GET on https://registry.npmjs.org/flowplayer-background
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.