HTML5 Video - Load and unload video tag with jQuery -
Get link
Facebook
X
Pinterest
Email
Other Apps
I am developing a website with a large slider which uses 100% width and height slides. I am using some video as background in some video slides. When I tried several plugins, some were working with JScroll, so I ended up using the "plain video jquery plugin" ().
The plugin uses video tags to play everything I am also adding a video tag inside each page, such as:
& lt; Div class = "rsImg page" id = "page1" & gt; & Lt; Video poster = "video / poster page" id = "video-intro" & gt; & Lt; Source src = "video / trailer_480p.ogg" type = "video / og" & gt; & Lt; Source src = "video / video.mp34" type = "video / mp34" & gt; & Lt; / Video & gt; & Lt; / Div & gt; & Lt ;! - End of page 1 - & gt;
The video plays and behaves correctly, it's good.
But as I add more slides, I am concerned about memory usage and slow speed in the whole experience. / P>
I have a function that listens for the "slide change" event, so there will be no problem deleting the video while changing the slide, such as:
So I have tried to clear and remove the empty divas, and after this, after that, to start the video again, I want to add the same code in one place. Thought, but it does not work as expected and I do not know that this is a good way to take care of the memory leak.
Edit:
I was using the "append" "html". My code now works like this, I need to increase memory and some kind of garbage collection. any advice?
नक्शा = नया बफर्ड इमेज [चौड़ाई] [ऊंचाई]; के लिए (int i = 0; i & lt; height; i ++) {for (int j = 0; j & lt; चौड़ाई; j ++) {if (charMap [j] [i] == पर्वत। इंडेंटफार्म) {if (j + 1 & lt ; चौड़ाई और amp; amp; j-1 & gt; = 0) {if (charMap [j-1] [i]! = पर्वत। इंडेंटिफ़ायर & amp; amp; & amp; amp; charMap [j + 1] [i]! = पर्वत। इंडेंटफार्म) {नक्शा [जे] [आई] = टाइल ग्रिड [1] [10]; }} और {नक्शा [जे] [आई] = टाइल ग्रिड [8] [10]; }}} यह कोड है जिसे मैं सेल के चारों ओर प्रत्येक टाइल को चेक करके 2 डी सर की जांच करने के लिए उपयोग कर रहा हूं लेकिन मुझे लगता है कि किसी को भी सोच रहा हूँ मदद कर सकता है? मुझे संदेह है कि आपको NullPointerException को charMap [j] से प्राप्त हो रहा है [ I] == पर्वत। इंडेंटिफ़ायर लाइन। सुनिश्चित करें कि आप ज्योफ द्वारा सुझाए गए दोनों मानचित्रों के लिए आंतरिक सरणियों को प्रारंभ करते हैं।
मैं गवा पुस्तकालय का उपयोग करता हूं। क्या प्रत्येक मान में बहु आयाप प्राप्त करने का कोई तरीका है? उदाहरण के लिए, मान 1 = [स्टैक], 2 = [ओवर, प्रवाह], 3 = [कॉम] मल्टीमैप में। यदि मल्टीमैप का नाम मैप है और कुंजी 2 है, तो map.get ("2") प्रकट होगा [ओवर, प्रवाह]। मुझे केवल "प्रवाह" प्राप्त करना है क्या यह सही है? एक multimap एक संग्रह देता है, यह लगता है कि आपको उस सूची में अंतिम आइटम की आवश्यकता है, उस स्थिति में आपको map.get ("2") पर कॉल करके सूची में अंतिम / एन-वें आइटम को पुनः प्राप्त करना होगा । अमरूद का एक वर्ग है जिसे Iterables नाम दिया गया है जो आपके लिए उपयोगी साबित हो सकता है। उदाहरण के लिए स्ट्रिंग अंतिम वैल्यू = Iterables.getLast (your_list);
I have a quick question that I am trying to add a field to a model which is the sum of 2 fields . For example: class MyModel (models.Model) fee = models I thought I could add a @staticmethod inside the model: @ Staticmethod def fee_total (auto): Returns self.fi + self.fi_stuff but I think the model's "fee_total" Can not use using the field: model Cheers Cheers I think that you want to add a method to your model, so it Can the. @staticmethod is a decorator that declares the method for class , then what is the difference? Well, long story short, static methods do not have any special examples, give an example for the object class object, by me class such as @property before mention of everyone A decorator has been used to make a method as a variable ... so you do not have to explicitly use () , you want to do this: class MyModel (models.Model) fee = models.DecimalField () fee_gst = models.DecimalField () @property def fee_total...
Comments
Post a Comment