Xibo won't advance past DHTML slideshow

Asked by Russ Strickland

I have set up Xibo for my organization and we're almost ready to go live. I found a really nice DHTML/Javascript rotating slideshow, configured it and substituted my own images. It looks fantastic.

But I can't use it. Why? Because Xibo won't advance past it. I've done it three ways:

As a web page
As a web page frame inside an overall page
As embedded code

Xibo displays it as it should and it looks great, but Xibo won't advance to the next page once it starts running. I set it for 30 seconds but it makes no difference. Once this slideshow page starts, I have to exit Xibo because it won't advance.

Any help is greatly appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Russ Strickland
Solved:
Last query:
Last reply:
Revision history for this message
Josef Biehler (gabbersepp) said :
#1

Maybe you can give us a link to that Script?
If its for free i may have a look at it

Revision history for this message
Dan Garner (dangarner) said :
#2

As Josef says, it is difficult to debug it without having the code for the slideshow...

It is most likely relying on some JavaScript that Xibo doesnt know how to start... we provide the init() and EmbedInit() functions for you to initialise any javascript you need.

Revision history for this message
Russ Strickland (rstrickland) said :
#3

It's this one:

http://www.dynamicdrive.com/dynamicindex14/carousel.htm

It runs in Xibo beautifully, both as a web page (hosted locally) or embedded, but Xibo can't advance past it to the next slide.

After I ran into this issue, I went into the code and removed the "onMouseover" tags and the URL's, since I don't need either of them. It makes no difference. Xibo still runs it but can't advance past it. As far as I can tell, the code isn't waiting for user input to close or anything. As I mentioned above, I also made a frame-based page, hosted locally, where the top frame displays some text and the bottom frame contains the slideshow. All of these methods yield the same result. I also tried changing the content type of the page that's supposed to run after it.

If any of you can figure this out, it will be greatly appreciated. I love this script (with my own created images, of course) and really want to use it in signage. But if Xibo can't advance past it, it renders the entire layout useless.

Thanks!

Revision history for this message
Dan Garner (dangarner) said :
#4

Use embedded media and try this.... in the embed script section:

<script type="text/javascript">
function EmbedInit()
{
 // Init will be called when this page is loaded in the client.
 $(document).ready(function() {
  Carousel();
 });
 return;
}
</script>

<< the entire content of the DHTML script from the site >>

Revision history for this message
Russ Strickland (rstrickland) said :
#5

Dan,

Thanks, but the result is the same; it runs it great, but won't advance past it.

Revision history for this message
Dan Garner (dangarner) said :
#6

I completely misread your original question - sorry. The slideshow plays fine, but the region doesn't advance once it's playing.

Can you have a look and see what the CPU usage it once the slide show starts?

Revision history for this message
Russ Strickland (rstrickland) said :
#7

I just checked it remotely. The CPU is at 57% and it's using 426MB of RAM out of 2GB. So year, the slideshow is a bit of a hog but it runs relatively smoothly.

Revision history for this message
Russ Strickland (rstrickland) said :
#8

Just for clarity, here's my entire embedded code, based on what you posted above:

[BEGIN CODE}

<script type="text/javascript">
function EmbedInit()
{
 // Init will be called when this page is loaded in the client.
 $(document).ready(function() {
  Carousel();
 });
 return;
}
</script>

<script type='text/javascript'>

/***********************************************
* Carousel Slideshow II- By Harry Armadillo (http://www.codingforums.com/showthread.php?t=58814)
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
* Please keep this notice intact
***********************************************/

function carousel(params){
  if(!(params.width>0 && isFinite(params.width)))params.width=100;
  if(!(params.height>0 && isFinite(params.height)))params.height=100;
  if(!(params.sides>2 && isFinite(params.sides)))params.sides=4;
  if(!(params.steps>0 && params.steps<100 && isFinite(params.steps)))params.steps=20;
  if(!(params.speed>0 && isFinite(params.speed)))params.speed=8;
  if(!(params.image_border_width>=0 && isFinite(params.image_border_width)))params.image_border_width=0;

  document.write("<div style='position:relative;overflow:hidden;' id='"+params.id.replace(/[^a-zA-Z0-9]+/g,'_')+"'></div>");
  var cdiv=document.getElementById(params.id.replace(/[^a-zA-Z0-9]+/g,'_'))
  cdiv.style.width=params.width+'px';
  cdiv.style.height=params.height+'px';
  cdiv.style.border=params.border;
  cdiv.style.position='relative';
  cdiv.style.overflow='hidden';
  cdiv.title=params.id;

  var counter=0,spinning=true,interval=Math.floor(60000/params.sides/params.steps/params.speed)-5;
  interval=isNaN(interval)?200:interval;
  var img_position=[],images=[],img_dimension=[];
  var img_index=params.images.length+1,img_index_cap=2*params.images.length;
  var faces=Math.ceil(params.sides/2), dimension, direction, targ, attr, faraway;

  function init(){
    if(params.direction=="left" || params.direction=="right"){
      direction=params.direction;
      dimension="width";
      }
    else if(params.direction=="top" || params.direction=="bottom"){
      direction=params.direction;
      dimension="height";
      }
    else {
      direction="left";
      dimension="width";
      }
    faraway=(direction=="left"||direction=="top")?'-20000px':'20000px';
    cdiv.style[dimension]=params[dimension]/(params.size_mode=='image'?Math.sin(Math.PI/params.sides):1)+'px';
    var img=new Image();
    img.style.position='absolute';
    img.style[direction]=faraway;
    img.style.width=params.width-2*params.image_border_width+'px';
    img.style.height=params.height-2*params.image_border_width+'px';
    img.style.border=(params.image_border_width||0)+'px solid '+params.image_border_color;

    for(var i=0;i<params.images.length;i++){
      images[i]=img.cloneNode(true);
      images[i].src=params.images[i];
      if(params.links && params.links[i] && params.links[i]!=''){
        targ=params.lnk_targets && params.lnk_targets[i]||params.lnk_base||'new';
        if(targ=="_blank"){
          attr=(params.lnk_attr && params.lnk_attr[i])?",'"+params.lnk_attr[i]+"'":"";
                    }
        else if(targ.substr(0,1)=="_"){

          }
        else{
          attr=(params.lnk_attr && params.lnk_attr[i])?",'"+params.lnk_attr[i]+"'":"";

          }
        images[i].style.cursor=document.all?'hand':'pointer';
        }

      if(params.titles && params.titles[i] && params.titles[i]!='')
        images[i].title=params.titles[i];
      if(document.all)
        images[i].alt=images[i].title;
      images[i+params.images.length]=images[i];
      if(params.images.length==faces)
        images[i+2*params.images.length]=images[i];
      cdiv.appendChild(images[i]);
      }

    var face_size=params.size_mode=='image'?params[dimension]:params[dimension]*Math.sin(Math.PI/params.sides);
    var face_offset=params[dimension]*Math.cos(Math.PI/params.sides)/(params.size_mode=='image'?Math.sin(Math.PI/params.sides):1)/2-.5;
    var pi_piece=2*Math.PI/params.steps/params.sides;
    for(i=0;i<=params.steps*faces;i++){
      img_dimension[i]=face_size*Math.sin(pi_piece*i);
      img_position[i]=(i<params.steps*params.sides/2)?Math.floor(params[dimension]/2/(params.size_mode=='image'?Math.sin(Math.PI/params.sides):1)-face_offset*Math.cos(pi_piece*i)-img_dimension[i]/2)+'px':faraway;
      img_dimension[i]=img_dimension[i]-2*params.image_border_width>1?Math.ceil(img_dimension[i])-2*params.image_border_width+'px':'1px';
      }
    }
  init();

  cdiv.rotate = function(){
    setTimeout('document.getElementById("'+cdiv.id+'").rotate()',interval);
    if(!spinning) return;
    if(++counter>=params.steps){
      counter=0;
      if(++img_index>=img_index_cap)
        img_index=params.images.length;
      }
    images[img_index-faces].style[direction]=faraway;
    for(var i=faces-1;i>=0;i--){
      images[img_index-i].style[direction]=img_position[counter+i*params.steps];
      images[img_index-i].style[dimension]=img_dimension[counter+i*params.steps];
      }
    }
   setTimeout('document.getElementById("'+cdiv.id+'").rotate()',100);
  }
</script>
</head>

<body bgcolor="#000000" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<CENTER>

<div style="margin-top: 1em; font-weight: bold;">
<script type='text/javascript'>
carousel({id:'ORPL Slideshow', //Enter arbitrary but unique ID of this slideshow instance
          border:'',
          size_mode:'image', //Enter "carousel" or "image". Affects the width and height parameters below.
          width:385, //Enter width of image or entire carousel, depending on above value
          height:504, //Enter height of image or entire carousel, depending on above value
          sides:6, //# of sides of the carousel. What's shown = sides/2. Even integer with sides/2< total images is best
          steps:80, //# of animation steps. More = smoother, but more CPU intensive
          speed:4, //Speed of slideshow. Larger = faster.
          direction:'right', //Direction of slideshow. Enter "top", "bottom", "left", or "right"
          images:['http://<SERVER NAME>/slideshow/carousel/images/bookcase1.jpg',
                  'http://<SERVER NAME>/slideshow/carousel/images/bookcase2.jpg',
  'http://<SERVER NAME>/slideshow/carousel/images/bookcase3.jpg',
   'http://<SERVER NAME>/slideshow/carousel/images/bookcase4.jpg',
                  'http://<SERVER NAME>/slideshow/carousel/images/bookcase5.jpg',
  'http://<SERVER NAME>/slideshow/carousel/images/bookcase6.jpg'],

                    image_border_width:1,
          image_border_color:'black'
          });
</script>

[END CODE]

I've encrypted the server location and you won't have my images, of course, but the script will still run and show the slides rotating.

Revision history for this message
Dan Garner (dangarner) said :
#9

To be honest with you, I can't think of any reason why (or indeed how) something in the embedded media type could prevent Xibo from moving on.

I also just tested it on an install here... and it moves on without any issues...

Maybe its actually something odd with your layout configuration? If you add something in the same region timeline, directly before and after, do they move on correctly?

Revision history for this message
Russ Strickland (rstrickland) said :
#10

I tried changing the item that comes after the slideshow and it didn't make any difference. Maybe I need to put the embedded slideshow into a different spot in the sequence.

Revision history for this message
Dan Garner (dangarner) said :
#11

All I had was a single layout with 2 media items..

1st one was your embed code
2nd one was a text item saying "text"

Both of the durations were set to 10 seconds - and they cycled through without any problem.

Are you using the Windows or Linux client (all advise has been based on Windows client 1.3.3 - 1.2.2 should be the same).

Revision history for this message
Russ Strickland (rstrickland) said :
#12

It's the latest Windows client. I'll try this with a new simplified layout on Monday.

Thanks!

Revision history for this message
Russ Strickland (rstrickland) said :
#13

Good morning, everyone. The problem is resolved....sort of. It turns out that this problem doesn't occur on Windows 7, 64-bit. I had been running it on an older box with XP, Service Pack 3.

So the question still remains, was XP the problem? It could have also been the XP video driver, I guess. I ruled out IE8 vs. IE9 because I also tried Firefox as the default browser.

So anyway, I'm loading a new (used) machine with Win 7 64-bit. I greatly appreciate all of your efforts in finding the solution.

Thanks!

Revision history for this message
Dan Garner (dangarner) said :
#14

Fyi.. my successful test was Win7 32bit