Getting started with HTML5

For #1, as a convenience, we use our Live Server to launch a mini-web server on your computer. The URL to get to the server is:

http://127.0.0.1:20605/

127.0.0.1 means localhost or your computer. :20605 is a TCP/IP port. Normally a web server runs on port 80, but you can have web servers run on other ports. We chose 20605 because not much else would use that port number.

If you double-click on the index.html file in the folder, it loads the HTML file directly in the browser and doesn’t run from a web server. For some simple things, this isn’t a problem, but it’s not running in a proper web server and if you have some requests, it may not work exactly as expected.  You, of course, can run your own local web server. Or you can upload the contents of the output folder to a real hosted web server for the most practical experience.

You can always go to http://127.0.0.1:20605/ in your browser to get back to your application assuming you’ve not closed the Live Server.

Thanks for info Rob. I encountered one more issue. I made a h5 test build with the box2d interface that comes on selecting game mode from Corona welcome screen. On successful build it took me to local host and showed play button and then a box drops down and hits ground. Which looks good and working.
But when I put it on web server for practical testing. It gets stuck onto Corona splash screen and green bar which ends to full.

Here’s the link
http://forecast.sirez.com/index/

Please suggest the solution

Are you including the “Standard Resources” when you build?

Rob

Yes.

On welcome screen of Corona SDK, we have 4 options to start creating the game app. One option is “Game”. I selected that and hit ok. Then the game that appears on Corona simulator is what I made I processed through h5 build.

Notably it works well on successful build and shows play button and box falling down. But after I put it on server, it shows only Corona splash screen with green bar

try to clean the destination/target folder and rebuild the app

this trick didn’t work. But I unzipped the bin folder and hit index.html file again. This time it opened on IE. But chrome is still not opening it 

Did you manually change the app ? 

Hello Guys. I have an issue.

There’s a hidden library called “al” which I am using to set pitch of audio on plank hit. Now the issue is, it is getting failed on H5 build and i get “Runtime error. Attempt to index global “al”” as error message when this library is intended to call in code. 

Setting pitch is very important part of my code.

Please help me resolve this issue.

The issue is only in H5 build. Where’s its running perfect on Android.

Regards

pitch is not implemented yet in H5… We are working on that.

When can i expect that to happen? you haven’t added only pitch or whole of OpenAL?

>> When can i expect that to happen?

hoping in a week

>>you haven’t added only pitch or whole of OpenAL?

H5 audio is based on native JS AudioContext and we do not plan to use OpenAL in H5.

Can you share some example of how to use pitch with native JS AudioContext in LUA?

We will be implemented pitch in such way: audio.setProperty(channel, “PITCH”, value).

Of course, you can use own JS plugin to implement pitch. Global variable audioCtx holds pointer to AudioContext.

https://coronalabs.com/blog/2018/03/22/making-html5-plugins-for-corona/

Hello!

Corona SDK is a very good framework! Thanks for your work!

I have a problem:
When I open the application on the phone or tablet, it works correctly.
I turn the phone or tablet and the screen automatically rotates. Events “tap” and “touch” do not work.

Link to app http://probel.su/mobh5/corsdk/

Link to video http://probel.su/mobh5/corsdk/events.avi

Code of my Application
        local WIDTH  = display.contentWidth;
        local HEIGHT = display.contentHeight;

        local background = display.newRect( display.contentCenterX, display.contentCenterY, WIDTH, HEIGHT );
        background:setFillColor( 0.6, 0, 0 );

        local circle = display.newCircle( display.contentCenterX, display.contentCenterY, 50 );

        local function pushcircle()
            transition.to( circle, { time=1500, x=circle.x +10, y=circle.y-100 } );
        end
        circle:addEventListener( “tap”, pushcircle );

        local function moveSprite( ev )
            if ( ev.phase == “moved” ) then
                circle.x = ev.x;
                circle.y = ev.y;
            end;
        end;
        circle:addEventListener( “touch”, moveSprite  );

Testing with
    Xiaomi redmi 4
    Asus MemoPad7
    
Corona Simulator 2018.3332

I’ve shared this with our engineering team.

Rob

@sens84 thanks for detailed bug report. The fix will come with next daily build.

build 3334 will come with audio.setProperty(channel, “PITCH”, value) implementation

Sorry to bother you with this, but is this fixed already? I’m still having issues with window resizing.

Build 3338 fixes window resizing issue.