Comments (8)
I tried this morning to implement Vimeo, but I don't like the idea of iframed video. I don't mind adding a little bit more of CSS, but for some reason I can't figure out how to make it keep full width and height and not show that black background on the sides when there's not enough width.
I found this link:
https://player.vimeo.com/external/158148793.hd.mp4?s=8e8741dbee251d5c35a759718d4b0976fbf38b6f&profile_id=119&oauth2_token_id=57447761
It allows us to add vimeo as you'd normally implement HTML5 video. So that way you can use it with Vidage immediately. However, I can't figure out what are all those params. Seems like oauth2 token is not required at all tho.
I'll keep looking into it...
UPDATE 1:
Seems like the URL that I've found is only for Vimeo Pro users. Well at least it's something.
If I find a way to have iframe as background cover without use of JS calculations on resize, I will surely implement it.
from vidage.
You can try something like this:
.video-container {
position: relative;
height: 0;
overflow: hidden;
}
/* 16x9 Aspect Ratio */
.video-container-16x9 {
padding-bottom: 56.25%;
}
/* 4x3 Aspect Ratio */
.video-container-4x3 {
padding-bottom: 75%;
}
.video-container iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
from vidage.
Nope, already tried something like that. Here's one demo tho of your code:
JSFiddle
It should not resize the video on the browser resize (in this case output column resize). It should always be full width and height of container but without ruining it's aspect ratio.
from vidage.
I did some research about this. Seems like Vimeo has officially created their API as modules which I can surely implement in Vidage. But YouTube on the other side, does not have it officially as module, but by third-party only. 😞
If I decide to do this, I'd need to rewrite Vidage logic a bit and have core functionality in one and all other possibilites as separate modules:
- html5 video
- vimeo video
- youtube video
Although I am not sure if I should compile them all in the end as one file or let the user decide which video player he'd like to use and that way keep the files as small as possible. Suggestions?
I had plans to keep Vidage as small as possible, but I've been considering implementing YouTube for a while. It just bothers me that they did not create their API as modules. So I'll think about it when I get time, thanks for your suggestion!
from vidage.
I don't think that compile them all in the end as one file will increase the size a lot.
from vidage.
Maybe you can try to play with height: 100vh and width: 100vw to have iframe as background cover without use of JS.
from vidage.
Not working, same as fixed or absolute position with all sides set to 0 or w and h set to 100%.
Aspect Ratio is being kept on resize and then black edges are shown.
from vidage.
I still did not find a solution of using <iframe />
without JS handling aspect ratio. Anyone?
If that's not possible, this won't be developed by me.
from vidage.
Related Issues (12)
- ParseError: 'import' and 'export' may appear only with 'sourceType: module' HOT 2
- Problems on Safari HOT 2
- osx safair bug HOT 4
- Sir tell me how to make a bot on telegram which can make video combine HOT 1
- It works in IE HOT 11
- Won't auto play muted video on Safari for Mac, iOS 14 for iPhone and iPad HOT 2
- Change video via javascript HOT 4
- Why there is no info about needed css in readme? HOT 1
- npm 0.1.3 Vidage.min.js missed HOT 4
- Remove video if it is mobile device HOT 11
- QQ – Android Messanger App (China) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vidage.