×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Problem with Simulator

    Hi all.

    I'm trying to create my first widget from On Demand Web TV demo, and I'm stuck with this issue.

    The OnlineMonitor class detects the connection status verifying the value of window.navigator.onLine. Surprisingly Web SDK Simulator returns always false for it. Have I missed something?

    Thanks in advance.

    Julio

  2. #2
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: Problem with Simulator

    Hi,
    I am also having trouble with simulator.
    I am using Nokia Web SDK Simulator 1.0.1.201009090819
    When I try to run the WEB Tv Demo project I get message "Video playback is not possible in offline mode." Does anyone know how to bypass this?
    Thanks

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: Problem with Simulator

    Hi,
    I have found a temporary half solution for this. If you use this solution you won't be able to play movies, only play around with non flash UI. It is good enough for designers to get the look and feel of the app before redesign.

    First thing's first I am using the WEB TV template from
    http://wiki.forum.nokia.com/index.ph...nnels_with_you!
    It's last update is dated 11:02, 14 September 2010 (UTC)

    Here goes temporary workaround:
    1. locate index.html file in your WEB TV folder
    2. open and edit it. In the line 13 you will find:
    var phone = true;
    Change this value to false. So the line should be
    var phone = false;

    Note that this is NOT real solution. This code will probably not work on the phone anymore. It seems to me that if statement from the line 14 isn't working fine in the simulator, it doesn't detect it correctly.
    You will NOT be able to play videos in the simulator using this solution, but everythisg else (User Interface) looks fine.


    Hope Nokia explains to us how to make this Widget work with simulator

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Re: Problem with Simulator

    The quick solution:
    To test your code with simulator, search for the lines having window.navigator.onLine, and comment all the "if" statements. The widget then will not verify your connection status anymore, but you will be able to run it.
    Remember to uncomment those lines before publishing.

  5. #5
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: Problem with Simulator

    Hi somms, thanks for your answer.
    I have tried what you said. I have found window.navigator.onLine only in the file onlinemonitor.js. It is there two times (line 29 and line 60).
    Can you run movies on your simulator now? My User interface (html, CSS nad javaScript) works fine in the simulator now but as soon as I click on the movie it doesn't play. I can oly see black screen with flash interface, but no movie. Have you managed to play movie from within simulator?

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Re: Problem with Simulator

    Hi Tslv.
    Your problem now is Flash related. You have to add express permissions to the folder where the project is located. The player is using some ExternalInterface calls that are forbidden by default.
    To solve this, the easy way, add the folder to your mms.cfg file. I'm using Windows 7 64bits, and I found it at C:\Windows\SysWOW64\Macromed\Flash (run the editor as Administrator).

    I added two paths:
    - The real path: C:\Users\xxxxx\WebSDKWorkspace\On Demand Web TV Demo\
    - The sandbox path : sandbox://201571455/C:/xxxx/Julio/WebSDKWorkspace/On Demand Web TV Demo/

    Maybe the sandbox path is not necessary, but I hadn't time to test. Try first with the real path if you want.

    I got the sandbox path from the debug window of my flash player. In order to see that window you need to install the debug version of flash player. Then you can monitor errors and warnings. I recommend you.

    Hope it helps.

  7. #7
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: Problem with Simulator

    Hi Soms,
    Thanks for helping me out here. Unfortunately I still haven't managed to get WEB TV to work in simulator. When I try to get the movies to play I get "Error message". Here is the picture of this:


    I have tried serching My PC for this mms.cfg file, but I don't have one. I used Windows serch. After this I tried Googling for it. I am using WinXP. Google told me thta mms.cfg should be located in:
    C:\WINDOWS\system32\Macromed\Flash
    This is for Win XP machines. Unfortunately I don't have mms.cfg in this folder. I decided to create one. I have used notepad to create new txt file. Saved the file as UTF-8 - Google told me this. In this file I have copied this path
    C:\Documents and Settings\user\WebSDKWorkspace\WebTV Modified
    So the file is empty and in the first line I have the path from above. Afterwards I renamed the file to mms.cfg. I have deleted txt extension. In the path above I have my WEB TV project files. There is no WGZ here, everything is extracted (unziped).
    I still cannot see movies. What am I doing wrong? What should I put in the mms.cfg file?

    Thanks

  8. #8
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Re: Problem with Simulator

    Hi, Tslv.

    You have to debug Flash to know exactly what is happening. Probably something more is failing. Install it from here:

    http://www.adobe.com/support/flashplayer/downloads.html

    Once it's installed, errors will pop up.

    Also a good idea is to install Flash CS4/CS5, load WebTV player project, and debug the movie using the remote debug option.

    Good luck!

  9. #9
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Problem with Simulator

    I'm also having problems in the emulator.
    I installed the flash debug and I get the following error:
    SecurityError: Error #2152: Full screen mode is not allowed.
    at flash.display::Stage/set_displayState()
    at flash.display::Stage/set displayState()
    at player2_fla::MainTimeline/frame1()
    Thank you!

  10. #10
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Re: Problem with Simulator

    Hi, yabune.

    Yep! I missed that bug!
    To use the movie in the simulator you have to comment a line on the source code. In frame 1, go to the actionscript layer and look for a line calling "displayState" to fullscreen (sorry for the vague details). Comment that line, and run.
    Remember to uncomment it when you are ready to deploy..
    Last edited by somms; 2011-04-01 at 18:39.

  11. #11
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Problem with Simulator

    thanks for the quick reply!

    Now I'm getting this error:
    SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///Users/####/nokia/WebTV/player2.swf cannot access file:///Users/####/nokia/WebTV/wrt_preview_main.html.
    at flash.external::ExternalInterface$/_initJS()
    at flash.external::ExternalInterface$/addCallback()
    at player2_fla::MainTimeline/initFrame1()
    at player2_fla::MainTimeline/frame1()
    One more question, is there any video template for S60 phones?

  12. #12
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Re: Problem with Simulator

    Yesss. And the solution to that error is what I replied to Tslv 3 messages ago

    s60 v5 support Flash, but it only supports AS2. The WebTV Templete uses AS3. I think Nokia has some AS2 template, but it hasn't been released officially

  13. #13
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Problem with Simulator

    thanks! now it's working!
    I would like to develop it for s60 but don't know how to create a flash lite player.
    I'll do a search to see if I found something...
    thank you!

  14. #14
    Registered User
    Join Date
    Oct 2007
    Posts
    8

    Re: Problem with Simulator

    Glad to here!
    There are some open source players out there that can make the work for you. You will have to enrich them with the ExternalInterface functions.

  15. #15
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Problem with Simulator

    I see...
    Do you know any one that could be interesting?
    I'm now searching for it, but didn't found one yet. Maybe I'm using the wrong keywords

Similar Threads

  1. Problem with symbian simulator..
    By kapilkshemkalyani in forum [Archived] Qt SDKs and Tools
    Replies: 7
    Last Post: 2010-11-02, 12:26
  2. Problem with 8310 Simulator
    By nechbi in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2002-10-11, 17:13
  3. Problem with 8310 Simulator
    By rayrealm in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2002-09-10, 04:29
  4. Problem with 3330 Simulator
    By Nokia_Archived in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2002-05-17, 13:10
  5. problem with nokia 7110 simulator
    By Nokia_Archived in forum Mobile Web Site Development
    Replies: 2
    Last Post: 2002-05-14, 20:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •