Speed up with many projekktors? (Projekktor Core)
Thank you, Inzoum, for the answer, but it doesn't work or I don't understand you.
Isn't it necessary to give every video-tag an unique ID? If I do so, avery 20 or 80 players work well.
Yes, you should give a unique ID to each video. However you don't need to use each video's ID to call the projekktor() funtion, you can use another selector that will target all of them at once and make only one call instead of 20 or 80 calls for each ID.
As such, calling projekktor('video'); will match all video
objects on your page.
Neither this nor video.projekktor works: I got the browser video player for all videos, instead of the Projekktor player (but the site runs: 0.2 sec instead of 26 secs for 80 videos).
According to this, it's correct:
http://www.projekktor.com/docs/quickinstall#projekktor_instantiation
Tested and working here (using projekktor('video') to target all video elements)
http://www.inzoum.com/projekktor/
(look at the code, there's only ONE call to the projekktor() function, which instanciates ALL videos. I placed it at the bottom, but it could be in the <head> as well)
calling projekktor('video');
BTW: Is this right? I miss the # in projekktor('#video')Uli
YES. This means that every <video> element is selected, using '#video' would ONLY target the element with the 'video' ID...
This is like in CSS and like jQuery... Read up on CSS selectors if you don't understand them, you need this knowledge or you won't pull your head out of the water.
If you have an object in your page like this:
<video class="myvideo" id="thisvideo" ...>
Your element is of "video" type, has the "thisvideo" ID (which must be unique) and has the "myvideo" class (which other elements can also have)
You can use plenty of different CSS selectors to match this:
'video' = matches EVERY <video> object on the page
'video#thisvideo' = matches the <video> object that has the "thisvideo" ID
'#thisvideo' = matches the object (any kind) that has the "thisvideo" ID
'video.myvideo' = matches ALL <video> objects that have the "myvideo" class
'.myvideo' = matches ALL objects (any kind) that have the "myvideo" class
Those are just basic selectors.
Complete thread:
- Speed up with many projekktors? - uli, 2012-07-23, 17:07
![Open whole thread [*]](templates/default/images/complete_thread.png)
- Speed up with many projekktors? - Inzoum, 2012-07-25, 16:39
![Show preview […]](templates/default/images/ajax_preview.png)
- Speed up with many projekktors? - uli, 2012-07-25, 17:05
![Show preview […]](templates/default/images/ajax_preview.png)
- Speed up with many projekktors? - Inzoum, 2012-07-26, 10:57
- Speed up with many projekktors? - uli, 2012-07-27, 10:29
![Show preview […]](templates/default/images/ajax_preview.png)
- Speed up with many projekktors? - sascha, 2012-07-30, 11:18
![Show preview […]](templates/default/images/ajax_preview.png)
- Speed up with many projekktors? - Inzoum, 2012-07-30, 11:20
![Show preview […]](templates/default/images/ajax_preview.png)
- Speed up with many projekktors? - uli, 2012-07-31, 08:57
![Show preview […]](templates/default/images/ajax_preview.png)
- Speed up with many projekktors? - uli, 2012-07-31, 08:57
- Speed up with many projekktors? - sascha, 2012-07-30, 11:18
- Speed up with many projekktors? - uli, 2012-07-27, 10:29
- Speed up with many projekktors? - Inzoum, 2012-07-26, 10:57
- Speed up with many projekktors? - uli, 2012-07-25, 17:05
- Speed up with many projekktors? - Inzoum, 2012-07-25, 16:39
