Author Message

Posted: Thu Mar 25, 2010 12:12 am   Post subject: Javascript API Example not working in FireFox on Linux

To simulate the functionality of my project (automatically and continuously playing a list of PowerPoint converted swf files in a web application), I modified your javascript.html demo as follows (code below):

    Removed all the code, except the code that loads the movie and the onPresentationPlaybackComplete function
    Added a button (id="startShow") to start playing an swf and when the onPresentationPlaybackComplete event fires, it calls myplayNext function which then plays another swf repeatedly.

All swf files were created from PP converted with iSpring Presenter.

This code works running in FireFox on Windows XP. However, the first swf plays, but the second swf just shows a blank screen when running it in FireFox v.3.5.8 on OpenSuse v.11.2 Linux. It appears to be related to the onPlayerInit call. I need to know if I'm using this API correctly and assure that it will be stable and consistent running in FireFox on both Windows and Linux. What do you think is causing this problem?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="fsplayer.js"></script>
        <script type="text/javascript">
      
            function myStartPlaylist() {
                var mov = "http://xxxxx.xx.xxx.com/apps/fab/display/data/1/1.swf";
                log("myStartPlaylist="+mov);
                showmovie(mov);
            }
            function myPlayNext() {
                var mov = "http://xxxxx.xx.xxx.com/apps/fab/display/data/test3/test3.swf";
                log("myPlayNext="+mov);
                showmovie(mov);
            }

            function log(str)
            {
                var log = document.getElementById("log");
                if (log)
                {
                    var options = log.options;
                    if (options)
                    {
                        options.add(new Option(str));
                    }
                }
            }

            var loader = new fsplayer.api.PresentationLoader();
            var pc;
            loader.onPlayerInit = function(player)
            {
                pc = player.getPlaybackController();
                pc.enableAllEventHandlers();
                pc.onPresentationPlaybackComplete = function()
                {
                    log("onPresentationPlaybackComplete");
                    myPlayNext();
                }
            }

            function showmovie(myMovie, pid) {
                loader.load(myMovie, "movieArea", "newPlayerId", 640, 480);
            }
        </script>

    </head>
    <title>JS API</title>
    <body>
        <table>
            <tr>
                <td>
                    <div id="movieArea"/>
                </td>
                <td>
                    <select id="log" size="2" style="width: 500px; height: 480px"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="button" id="startShow" value="Start Play" onClick="javascript:myStartPlaylist()"/>
                    <b id="indexLabel"></b>
                </td>
            </tr>
        </table>

    </body>
</html>


Profile profile test

Posted: Thu Mar 25, 2010 8:08 am   Post subject: Re: Javascript API Example not working in FireFox on Linux

Thank you for reporting this issue. We will research it and provide you with the solution as soon as the issue is resolved


Profile profile test WWW www ICQ ICQ

Posted: Thu Mar 25, 2010 4:05 pm   Post subject: Re: Javascript API Example not working in FireFox on Linux

I did some more testing. It doesn't work in FireFox or Google Chrome on Ubuntu or Suse Linux. It just doesn't work in browsers running on Linux. It seems to work only running in Windows based browsers.

I hope you guys can find this problem soon. Otherwise, I will have to look for another solution. Thanks for your help.


Profile profile test

Posted: Mon Mar 29, 2010 2:36 pm   Post subject: Re: Javascript API Example not working in FireFox on Linux

The problem is being investigated at the moment. I expect the solution to be provided in the nearest 1-2 days

Thank you for your patience.


Profile profile test WWW www ICQ ICQ

Posted: Tue Mar 30, 2010 11:51 am   Post subject: Re: Javascript API Example not working in FireFox on Linux

Dear ccessna,

We have fixed this issue. You may download the hotfix using the following link:
http://www.ispringsolutions.com/downloa ... _fixed.zip

This fix will be also included in one of the nearest updates of iSpring Presenter and iSpring SDK products.

Please let us know if the fix works to you


Profile profile test WWW www ICQ ICQ

Posted: Tue Mar 30, 2010 3:31 pm   Post subject: Re: Javascript API Example not working in FireFox on Linux

Aleksey,

I used your new fsplayer.js and swfobject.js.
I also changed a line in my example code to match your new javascript.html from this...
loader.load(myMovie, "movieArea", "newPlayerId", 640, 480);
to this...
loader.load(myMovie, document.getElementById("movieArea"), "newPlayerId", 640, 480);

Those are the only changes I saw that needed to be made.

The problem persists. It still does not work in FireFox running on Linux.

Is there something I missed?

Thanks,
Chris


Profile profile test

Posted: Thu Apr 01, 2010 12:54 pm   Post subject: Re: Javascript API Example not working in FireFox on Linux

ccessna wrote:
Aleksey,

I used your new fsplayer.js and swfobject.js.
I also changed a line in my example code to match your new javascript.html from this...
loader.load(myMovie, "movieArea", "newPlayerId", 640, 480);
to this...
loader.load(myMovie, document.getElementById("movieArea"), "newPlayerId", 640, 480);

Those are the only changes I saw that needed to be made.

The problem persists. It still does not work in FireFox running on Linux.

Is there something I missed?


We have researched the issue. We didn't manage to reproduce in Firefox 2.x under Suse 10.2. After checking the issue under Firefox 3.5 running on Suse 11.2 we have finally managed to reproduce it.
The reason for this issue is that Linux version of Firefox do not allow creation of new Flash object instance from the Flash event handler. To resolve the problem the next presentation must be loaded on timer event as it is shown below:

Code:
pc.onPresentationPlaybackComplete = function()
{
   log("onPresentationPlaybackComplete");
   setTimeout('myPlayNext()', 1);
}

The complete source code of the fixed HTML file is shown below

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>JS API</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <script type="text/javascript" src="fsplayer.js"></script>
      <script type="text/javascript">
      
         function myStartPlaylist()
         {
             var mov = "presentation1.swf";
             log("myStartPlaylist="+mov);
             showmovie(mov);
         }
         
         function myPlayNext()
         {
             var mov = "presentation2.swf";
             log("myPlayNext="+mov);
             showmovie(mov);
         }
   
         function log(str)
         {
            var log = document.getElementById("log");
            if (log)
            {
               var options = log.options;
               if (options)
               {
                  options.add(new Option(str));
               }
            }
         }
         
         var loader = new fsplayer.api.PresentationLoader();
         loader.onPlayerInit = onPlayerInit;
         
         function onPlayerInit(player)
         {
            log("onPlayerInit");
            pc = player.getPlaybackController();
            pc.enableAllEventHandlers();
            pc.onPresentationPlaybackComplete = function()
            {
               log("onPresentationPlaybackComplete");
               setTimeout('myPlayNext()', 1);
            }
         }
         
         function showmovie(myMovie, pid)
         {
            loader.load(myMovie, "movieArea", "myPresentation", 640, 480);
         }
      </script>
   </head>
   <body>
      <table>
         <tr>
            <td>
               <div id="movieArea"/>
            </td>
            <td>
               <select id="log" size="2" style="width: 500px; height: 480px"/>
            </td>
         </tr>
         <tr>
            <td colspan="2">
               <input type="button" id="startShow" value="Start Play" onClick="javascript:myStartPlaylist()"/>
               <b id="indexLabel"></b>
            </td>
         </tr>
      </table>
   </body>
</html>


Profile profile test WWW www ICQ ICQ

Posted: Thu Apr 01, 2010 11:43 pm   Post subject: Re: Javascript API Example not working in FireFox on Linux

Aleksey,

Thanks for the quick response. It makes me more confident about using your product. I will try the workaround. We may just stick with FireFox on Windows, as it seems to work with no problems.

Regards,
Chris


Profile profile test

Posted: Tue Apr 06, 2010 8:51 am   Post subject: Re: Javascript API Example not working in FireFox on Linux

ccessna wrote:
Aleksey,

Thanks for the quick response. It makes me more confident about using your product. I will try the workaround. We may just stick with FireFox on Windows, as it seems to work with no problems.


I wonder if you had a chance to try the workaround. Please let me know if everything works ok now.

Looking forward to your feedback


Profile profile test WWW www ICQ ICQ
Display posts from previous:  Sort by  

  


Who is online
Who is online In total there are 7 users online :: 2 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 108 on Thu Nov 21, 2013 3:41 pm

Registered users: Baidu [Spider], Bing [Bot]