You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 296

Location: Berlin

  • Send private message

1

Wednesday, September 18th 2013, 9:30pm

not (!) tablet - still showing on ipad?

Hello,

Can anybody tell me, what's wrong with this code?

Source code

1
<style name="video-hs" tag="hs" devices="!mobile|!tablet" ...  


The hotspots show still up on ipad - isn't that regarded as a tablet???

Confused...

Michael

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Wednesday, September 18th 2013, 9:44pm

Hmmm... I thought that ! sign means 'except'. What if try "devices="all|!mobile|!tablet" ? in that case it is "all except mobile and tablets", where as in your code, maybe, the player is somehow confused FROM WHAT it should make that exception? *rolleyes*

Well, just guesses, though...
Regards,

Alexey

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 296

Location: Berlin

  • Send private message

3

Wednesday, September 18th 2013, 10:25pm

Ah... oh. I thought it would mean "not". But I will try your version then :-) Thanks a lot for taking your time

Yours,
Michael

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 296

Location: Berlin

  • Send private message

4

Wednesday, September 18th 2013, 11:12pm

Sorry Alexey - I liked the idea - but that was not the reason :-(

Even with

Source code

1
<style name="video-hs" tag="hs" devices="all|!mobile|!tablet" ... 


the hotspot shows up...

Any other idea from anyone?

Michael

Arsdezi

Intermediate

Posts: 174

Location: Ukraine

  • Send private message

5

Thursday, September 19th 2013, 12:34am

it's wrong solution, because iPad is also tablet!
Maybe:
devices="!mobile|!android
!android - for all adnroid device: mobile and tablet, !mobile - for all mobile device and platform, iPhone too.

6

Thursday, September 19th 2013, 7:28am

Hi,

there are 3 key-characters in the devices check syntax:

| = OR - that means either the left OR the right condition must be true
+ = AND - that means the left AND the right condition must be true
! = NOT - that means the given check will be inverted (from true to false or from false to true)

That means when you write:

!mobile|!tablet

that means:

(NOT mobile) OR (NOT tablet)

and on an iPad (as tablet) this check will result in:

(TRUE) OR (FALSE)

TRUE, because it's not a mobile (it's a tablet instead)
FALSE, because it's a tablet and it checks for no tablets

and true OR false finally leads to:

TRUE

and so the devices check is true and the element will be included.

Best regards,
Klaus

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

7

Thursday, September 19th 2013, 8:24am

So, to exclude mobiles and tablets from the devices the right way is to write

Source code

1
devices="!mobile+!tablet"


Do I get it right?
Regards,

Alexey

8

Thursday, September 19th 2013, 10:21am

Hi,

yes, that would work, or simply write:

Source code

1
devices="desktop"


That would be the same.
When it's not a mobile and not a tablet, then it can be only a desktop.

Best regards,
Klaus

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 296

Location: Berlin

  • Send private message

9

Thursday, September 19th 2013, 3:33pm

Thank you Klaus for making that clear to me :-)

In fact, I did it the other way round then on my own, because ! mobile + ! tablet obviously had to be a desktop. Trying this !mobile|!tablet derives from some other code, where I used more then one device parameter. But anyway I was wrong in my understanding of the | sign in general even there and this probably made me go crazy before as well. I simply regarded the pipe sign as being used to separate more than one item, not as an OR. So, this will help a lot in the future.


Thanks again,
Michael

This post has been edited 1 times, last edit by "mstoss" (Oct 16th 2013, 1:00pm)