One final question. It would be really useful if it were possible to grab the Screen Mode before options were loaded into the gallery. One could then do some really cool stuff in Small Screen Mode with full screen galleries, like reduce thumbnail size and ButtonBar font size (useful if you have a lot of buttons activated).

It's great to have the option of larger thumbs and buttons, but they are not really suitable for mobile phones where space is an issue. I think that having access to Screen Mode, at least in terms of design, would be a massive improvement.

Any chance of it happening?

Okay. Thank you.

Apologies for the tardy reply. I set-up 4 example galleries and then tested them on an iPhone 5c running IOS 7.4 and an iPhone 6 running IOS 8.2 and then IOS 8.4. I'll leave the example galleries up for 10 days. Let me know if you need longer.

So, the example galleries:

1. http://www.brianwebster.uk/index/juicebox-one
The viewport metatag is enabled
autoPlayOnLoad='False'
showSmallThumbsOnLoad='True'

2. http://www.brianwebster.uk/index/juicebox-two
The viewport metatag is enabled
autoPlayOnLoad='true'
showSmallThumbsOnLoad='False'

3. http://www.brianwebster.uk/index/juicebox-three
The viewport metatag is disabled
autoPlayOnLoad='False'
showSmallThumbsOnLoad='True'

4. http://www.brianwebster.uk/index/juicebox-four
The viewport metatag is disabled
autoPlayOnLoad='true'
showSmallThumbsOnLoad='False'

Results:

Iphone 5c and IOS 7.2 displayed all the galleries without error.

Iphone 6 IOS 8.2/8.4 displayed galleries 1 to 3 without error. It failed to display gallery 4 correctly. The buttons don't display in portrait. Tapping the screen does not unhide them. You have to turn the phone to landscape before they are displayed. Once the buttons are displayed they work as expected.

Am I likely to encounter problems if I leave the viewport metatag enabled?

Thank you.

If I set buttonBarPosition='OVERLAY' and autoPlayOnLoad='True', the button bar is hidden (and photos/images are too large/don't scale to fit) in small screen mode on a mobile device. I tested on iPhone 5 and 6 using a full page gallery. Tapping the phone screen doesn't unhide the button bar, but turning the phone to landscape sometimes works. Adding a viewport metatag solves the problem.

<meta name="viewport" content="width=device-width, initial-scale=1">

   
But using the viewport metatag stops small screen mode from activating when autoPlayOnLoad='False'.

Any ideas? I can provide the html/script for the page if required.

Thank you. If  small screen mode is set, I know reset the icon size (20px) and containers to the appropriate values. This seems to have done the trick.

Thank you for the suggestion. I tried this and it worked perfectly, but the client really didn't like it as the button bar appears about the same time was the image and he didn't like the delay. I will have to use an alternative approach.

So… I thought I would let the client see what small screen mode is like. If he likes it then problem solved, but I can't get it to work, see http://www.brianwebster.uk/index/animus. The gallery fits the following criteria:

a. The gallery has dimensions of 100% x 100%.
b. There is no existing viewport tag on the web page.
c. The gallery is the only content on the page.

I have also set showSmallBackButton, showSmallThumbsOnLoad, showSmallThumbsButton, showSmallThumbNav and showSmallPagingText.

What am I doing wrong?

Thank you.

Yes, if one is using a lot of buttons, they will wrap on mobile devices. It's not that I want them to scale depending on the number of buttons, I just want to change the size of the buttons in small screen mode because they are too large.

(I expected them to be smaller in small screen mode is all. I appreciate that I didn't explain myself very well.)

I've used the following code to try and solve this.

var jb = new juicebox({
    containerId: '@Model.Container'
});
jb.onInitComplete = function (e) {
    var mode = jb.getScreenMode();
    if (mode == 'SMALL') {
        $(".jb-bb-button").css("font-size", "16px");
    }
};

The problem with this is, the buttons initially display at the preset size of 20px before resizing. Is there a better way of applying the resize so this doesn't happen?

My apologies. I think I may have wasted your time. I've just noticed that the API has the getScreenMode method. I'll try altering the config options if this is set to 'SMALL'. I'll get back to you if I can't get this to work. Thanks for the speedy reply.

Am I correct in saying that ButtonBar buttons (and the back button) do not scale? If I am viewing a full screen galley on a mobile phone and have set-up a lot of buttons, the buttons wrap because, I assume, they haven't scaled down. Is it possible to resize the buttons for Small screen Mode?

Gosh! Yes I do have AdBlock. All works fine after disabling it. My client was rather taken with Cross_Fade and I think he will have to reconsider using it until this issue is fixed. Any idea when that might be? Anyway, thank you for the super-speedy response.

I can't get Cross_Fade to work properly with AutoPlay on Safari. Images flicker during transitions when using Cross_Fade for imageTransitionType and when using AutoPlay. I've tested on the latest versions of Chrome and Firefox (on Windows and Mac) and on IE, and they all work fine. I'm using Safari 6.1.6.

The Galleries are both embedded and full-page, no iframes. You can see the issue more clearly on full-page galleries. I have put up an example page at www.brianwebster.uk/index/juicebox-test. If you resize Safari during a transition, you can briefly see a white frame with the image path in the top left-hand corner.

I updated to JuiceBox 1.4.4, but the issue remains.

Any ideas?

Works perfectly, thank you.

Thank you for the speedy answer. This is the kind of solution I was hoping for. I will give it a try and get back to you.

Is there a way to detect if audio is playing or toggled 'on'? My reason for asking is that I launch JuicebBox in a jQuery dialog and the audio track carries on playing when it's closed. Calling remove() on the dialog div does not kill the audio. I would like to be able to turn the audio track off before closing the dialog. Any ideas?