full screen video play back on nivo lightbox - fullscreen

I am using the nivo lightbox in my theme I have added a youtube video link , when user clicks on button video starts to play. But it is not playing on full screen. How can I make the video play full screen on nevo lightbox? thanks

I noticed that nobody gives an answer to this question anywhere and I needed it too. Vimeo goes fine but Youtube specically needs the iframe's allowfullscreen="true", so I looked into the code of jquery.nivo.js (and/or jquery.nivo.min.js if you use it). search for "$('<iframe>', and add the option allowfullscreen: true,
Do this search twice and repeat this addition a second time further down. allowfullscreen: 'true', gives the same result, no problem. Whether a boolean (true) or a string ('true') doesn't matter. jquery picks up the additional option flauwlessly and youtube videos will show their fullscreen button nicely. It was probably forgotten by the makers of the nivo lightbox. To add it in the min.js I simply broke the single line in two parts, search for the var and added the option without spaces, after which I concatenated the two parts back again. Works flawlessly. I've used the boolean method but have no special reasons. It may be a fraction faster than the string.

Related

how to customise elementor functionality(how do I find the right bit of code?)

I'm trying to make a web page formatted similar to that of Netflix. Where a list of videos are displayed in a div with two arrows in either direction on each side. When the number of videos are more than the width of the window clicking the arrows moves the displayed videos in the corresponding direction by one video.
And(key part), when a video is clicked, the clicked video gets displayed on another div(main part of the screen) with a text of introduction and an excerpt of the video playing in the background of that section, plus a "play" button to start the video.
I would probably be able to sort it out with vanilla code. But this page is managed by WordPress so I would have to plug in my code with wordpress.
My assumption is that hacking the existing elementor code for the video widget would be the quickest way to do it. But I don't know how to find the code corresponding to the functionality I need to modify to customize it to do what I want. I can locate the video-widget file, but still, it's a huge file with lots of code. How do I find the functionality I need specifically to import into my own code?
Thank you and sorry for the verbose phrasing.

is there a way to flush the page cache? (window.init and audio autoplay won't work)

If I have an interactive widget that has something like
window.init = function() {alert('foo');};
or
<audio src="foo.mp3" autoplay="" loop=""></audio>
then when I close the interactive widget and bring it back up again, the init() doesn't run again and the audio won't automatically play.
In the case of audio, the sounds stops playing when you close the interactive widget. When you reopen the interactive widget, the sound does not start playing automatically.
However, if I page left or right a few pages (until I see the "loading..." indicator), then the interactive widget cache gets flushed. I can then go back to the page with the interactive widget and the init() will run and audio will play again.
(Note that for <audio> to have a sound play automatically and loop, the autoplay and loop properties just have to exist. The value of those properties doesn't matter so I can just have quote quote)
Is this a known problem with ibooks?
Is there any way to force that cache flush?
You could try setting a function on widget.didEnterWidgetMode (more documentation here) that resets the progress when the widget gets opened again.
edit: So if you look at this Apple thread on widget creation for iBooks Author, they mention adding a Javascript snippet for AppleClasses/AppleWidget.js. The code for that file is here (at least, according to someone on the internet :)), and in that file there's the same widget.didEnterWidgetMode function.

Strange LWUIT Dialog behaviour while using Dialog.showPacked() with BorderLayout.CENTRE positioning

I am using LWUIT for series 40 for making my J2ME app and I have noticed a strange behavior of the LWUIT-Dialog while using the showPacked() method, the dialog being positioned with BorderLayout.CENTER.
This happens especially in touch phones.
I have attached an image in order to describe my situation.
Initially the dialog appears as shown in the first part of the image.However,it expands in the next few seconds to become like the one shown in the second part of the image.
Future calls to display the dialog using showPacked appears like the third one.I am clueless as to why this is happening.I want my dialog to appear like the one shown in the first half of the image all the time.Where have I gone wrong?
Note : The content of the Dialog is a an animated label.
I have no idea what the guys did there but I'm guessing they reflow the UI too aggressively. Try setting Dialog.setAutoAdjustDialogSize(false) and see if it solves your problem.
You can remove the title and background et al. with the code below, it makes only your animated GIF show with the dimmed dialog background :
setTitle(" ");
setUIID("Null");
setDialogUIID("Null");
getStyle().setBgTransparency(0);
getSelectedStyle().setBgTransparency(0);
getUnselectedStyle().setBgTransparency(0);
getPressedStyle().setBgTransparency(0);
getDialogStyle().setBgTransparency(0);

MonoTouch Dismiss Keyboard (sort of)

I am writing a MonoTouch iOS app. I have read many postings about ResignFirstResponder and I am using that.
My app is a typical table view app. I have done my own custom table cell view. The UITextField controls that cause the numeric keypad to come up in the first place are all on the custom table cell.
Currently I have it so that if you tap on the background of the cell I call ResignFirstResponder on all the text fields. This seems to work, but is not intuitive. I had a new beta tester get it last night and he tapped on one of the text fields and the keypad came up and he was lost as to how to get rid of it. After I told him to just tap the background, he now is fine, but obviously I want a solution that is obvious and doesn't require me to tell everyone how it works.
I read one post about a way to add a DONE button to the keypad, but it looked like a total hack and even broke when 3.2.1 came out and I don't want to have to worry about my app breaking when a new OS comes out.
Suggestions?
I would keep the background click->ResignFirstResponder that you have already, but add to it.
Curious, what button do you have set in the bottom right of the keyboard? There are options to show a Done, Search, Go, Next etc. buttons that can be setup to ResignFirstResponder. Pick the button that makes sense in your situation.
You can hook into the bottom right button by setting a callback to UITextField.ShouldReturn and calling ResignFirstResponder. You can just return false (that return value is for allowing line breaks in your UITextField).
Found an example here of hooking up ShouldReturn.

How can I create scrolling areas like the ones on stackoverflow?

I'm currently working on a flash project, which will use multiple scroll areas.
I'm trying to find out how to create a scroll area like I see on stackoverflow, and make it function similarly.
Whenever someone posts their lines of code to stackoverflow, the scroll area scrollbar looks exactly like the scrollbar in the web browser, and is able to be scrolled with the mousewheel smoothly, without affecting the webpage scrolling.
Example: disable mouse wheel scrolling while cursor over flex app?
Could anyone please explain to me how I can do this in my flash project?
Thanks!!
You wouldn't need flash to do this... This is accomplished using CSS. You would just need to put the portion you wanted to function like that in a div (or any HTML container for that matter) and then define such properties as min-height, max-height, min-width, max-width, overflow, etc. I think there's one that determines the presence of the scroll bars but I don't remember what it is for sure. Very easy to do this and flash would be a bit of overkill.

Resources