Keyword

JW Allvideos embeded video multiple sizes

  • Nilton Pereira
  • Nilton Pereira's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #100643 by Nilton Pereira
JW Allvideos embeded video multiple sizes was created by Nilton Pereira
Hi,

I'm new to K2 and AllVideos (working with K2 for three weeks now). I'm also new to all this community and forum interaction thing since I normally find my way by reading other persons solved problems.

But this time I'm really lost and I don´t seem to find a solution.

Problem:
I created a category named "Videos" that will only have items with videos (one video per article/item) embeded from Vimeo or Youtube, whatever the client sees fit. The idea is to have the category displaying the articles normally in columns and having the preview of the video in the item category list, with the title, text, et cetera.
So far so good.

The problem is that I can´t seem to define two different sizes, one for the preview and another size when we're in the item.

I don´t know if I can define different sizes for an uploaded video (with all K2 options in the item view and item category listing it seems I can), but with an embeded video (with the width and height defined in Youtube) I just can't define different sizes.

If I define that I want a smaller size for the video, K2's media bounding box will have that size I defined, but the video will be displayed with the original size, getting outside that black bounding box.

So, what I need to know is: can Item View Options in K2 change the width an height of embeded videos? Or am I just experiencing some technical issues?

Thanks in advance!

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100644 by Lefteris
Replied by Lefteris on topic Re: JW Allvideos embeded video multiple sizes
Hi. You can upload an image and use it as thumbnail in your lists. Alternatively you can resize the videos with CSS.

Please Log in or Create an account to join the conversation.

  • Nilton Pereira
  • Nilton Pereira's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #100645 by Nilton Pereira
Replied by Nilton Pereira on topic Re: JW Allvideos embeded video multiple sizes
Hi, thanks for the reply.

I can edit the css for the video preview? I didn't think I could do that effectively since the video link comes with that exact size information.

I'm gonna give it a try.

Please Log in or Create an account to join the conversation.

  • Nilton Pereira
  • Nilton Pereira's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #100646 by Nilton Pereira
Replied by Nilton Pereira on topic Re: JW Allvideos embeded video multiple sizes
I hate when the solution is right under my nose! :p
It worked like a charm.

Again, thanks a lot.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100647 by Lefteris
Replied by Lefteris on topic Re: JW Allvideos embeded video multiple sizes
You are welcome.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100648 by MikeA
I guess I am even newer to K2 and Allvideos than you are, because even with the suggestion "you can edit the size of the video preview in CSS" I still don't understand how to have one size of player in the item and another size of player in the category listing. Please help! Thanks.

MikeA

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100649 by Lefteris
Replied by Lefteris on topic Re: JW Allvideos embeded video multiple sizes
@MikeA

You need to know CSS language to do this.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100650 by MikeA
Thanks for the reply. I actually do know enough CSS that with a little help from this board I could get this to work. I thought it was good practice on boards that if you solve what the topic is about that you include how you solved it for future reference, but this topic doesn't include that.

I think I have to use the .allvideos object as described in this post here but even that thread doesn't have a clear, working example. Any help would be appreciated.

MikeA

Please Log in or Create an account to join the conversation.

  • Nilton Pereira
  • Nilton Pereira's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #100651 by Nilton Pereira
Replied by Nilton Pereira on topic Re: JW Allvideos embeded video multiple sizes
MikeA

When I was digging the internet for a solution I never thought of editing the CSSs. I was so focused on the idea that there was a solution inside K2's options, that I never searched other ways of doing what I wanted to do.

It's always the same thing when I have this kind of problems: when I google stuff and I can't find a clear answer, that's because the answer is REALLY under my nose :p

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100652 by MikeA
I'm glad that you found your solution. maybe my nose is bigger because I'm still trying to learn this. By "editing the CSS" I can create a class with the allvideos videos inside and set it's display to none like this

.vimeoclass {
display:none;
}

but I want the class to be hidden when it is inside a catItemBody div (the Category List view) but not hidden when it is inside a itemBody div. How do I do that?

MikeA

Please Log in or Create an account to join the conversation.

  • Nilton Pereira
  • Nilton Pereira's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #100653 by Nilton Pereira
Replied by Nilton Pereira on topic Re: JW Allvideos embeded video multiple sizes
I see you have a "vimeo" class. In my case I have a category where all the videos will be and, as I've said before, I wanted the category view to show thumbnails smaller than the video. So, if I had an embedded video with 420px X 315px, it would be this size in the item view, but not on the category listing.

I achieved this after editing K2's CSS. I just changed some bits and created a more specific rule targeting the 'iframe'. So, at the end I had this piece of code:

div.catItemVideoBlock {
margin:0 0 16px 0;
padding:16px;
}
div.catItemVideoBlock div.catItemVideoEmbedded {
text-align:center;
}

div.catItemVideoEmbedded iframe{
width: 240px;
height:180px;
}
div.catItemVideoBlock span.catItemVideo {
display:block;
}

I'm not sure anymore, but I think I just added the "div.catItemVideoEmbedded iframe" code. The rest was already there, styling K2's video block.

So, in your case, you might need something that looks like this:

div.catItemBody .vimeoclass {
display:none;
}

This way only videos inside the item will be displayed. If you changed "div.catItemBody" with "itemBody", then you will be hidding the video inside the item.


I'm not sure if this is what you were looking for, I just hope I could help.

Please Log in or Create an account to join the conversation.

  • etkritikonspoudon
  • etkritikonspoudon's Avatar
  • Offline
  • Junior Member
More
12 years 10 months ago - 12 years 10 months ago #100654 by etkritikonspoudon
Replied by etkritikonspoudon on topic Re: JW Allvideos embeded video multiple sizes
I am going to be politically incorrect and say that the easiest way to get a nice video blog with videos displayed in category view and item view and be resized according to the user's wishes, is to install ZOO cck, create an blog app instance, assign a media element to the teaser and full item view, define its dimension in each view and you're done...

K2 has an incredibly well commented code, very friendly to the developer, but it forces users to become developers to get the some of their minimal requirements in presentation and function implemented...

As a layman or an average-Joe, I was able to configure my site to 100% of my requirements in less than one day of using ZOO, without even having to consult the available documentation, while I've been reading K2 forums and guides for weeks now, trying to get K2 to display as I want...

That's not to say that K2 does not have advantages over ZOO, but for a non-developer needing to concentrate on creating content instead of spending valuable time on technical issues and maintaining all the overrides, ZOO is like a breath of fresh air...
No need to install additional extensions -beside Widgetkit- either: GoogleMaps, Flickr images, Disqus (or Intense Debate) comments, galleries, videos, addthis, form capabilities etc are all available and integrated in ZOO

Being greek and having devoted some time translating K2 (and reading about it), I would love to be able to use it, but there are a lot of things that should be available as options which instead necessitate "getting your hands dirty in code"...not that I don't like learning, but I celebrate usability and time efficiency even more...

Despite that, if K2 were to "learn" a few things from ZOO, I would be happy to adopt it instead...will be following the forums either way...

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #100655 by MikeA
Nilton,

Thank you very much for your help. This is exactly what I needed!

MikeA

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum