Internet Browser
Internet Browser is a web browser preloaded on the Wii U. It is based on NetFront Browser NX v2.1, which uses the WebKit rendering engine.
Known User Agent Strings
Region | Release Date | UA String |
---|---|---|
US | Nov 18, 2012 | Mozilla/5.0 (Nintendo WiiU) AppleWebKit/534.52 (KHTML, like Gecko) NX/2.1.0.8.21 NintendoBrowser/1.0.0.7494.US |
EU | Nov 30, 2012 | TODO |
AU | Nov 30, 2012 | TODO |
JP | Dec 8, 2012 | TODO |
Multimedia Support
Internet Browser supports HTML5 audio and video. The only video format supported is H.264 either in an MPEG-4 container or in an MPEG-2 transport stream with a M3U8 index according to the HTTP Live Streaming specification. The only audio format supported is AAC in an MPEG-4 container.
The browser can display BMP, PNG, GIF, JPEG, and SVG images, but Image Preview mode only supports JPEG images.
Other HTML5 features supported include canvas, web storage, web messaging, server-sent events, device orientation, and WOFF.
External plugins, such as Flash and Java, are not supported.
Controls
Under normal circumstances, Internet Browser uses the following controls:
Left Stick | Scroll/Pan |
Click Left Stick | Hide/show bottom toolbar |
Right Stick | Zoom |
Click Right Stick | Toggle zoom in/out on center of screen |
+ button | Zoom in |
- button | Zoom out |
L button | Back to previous page |
R button | Forward to next page |
ZL button | Switch to previous tab |
ZR button | Switch to next tab |
Hold ZL+ZR | Tilt scrolling |
D-pad | Select links / form fields |
A button | Send the "Enter" key (keyCode 13) |
B button | Back to previous page |
Hold B button | Close current tab |
Y button | View bookmarks |
X button | Toggle curtain mode |
Home button | Quit browser |
Tap screen | Click page elements |
Double-tap screen | Zoom in/out on point |
Touch drag | Scroll/Pan |
Some of these functions can be disabled by markup on a web page.
Wii U Scripting Functionality
In addition to W3C standard touch screen functionality, Internet Browser exposes many Wii U input and output functions to Javascript through the wiiu object.
wiiu.gamepad
The wiiu.gamepad object allows Javascript functions to read the current state of the primary Game Pad.
TODO: Figure out what contentX, contentY, and isDataValid are.
Reading values
In order to read any values from the Wii Remote, input must first be enabled by setting wiiu.remote.isEnabled = 1.
Once enabled, the function wiiu.gamepad.update() will populate all of the properties on the wiiu.gamepad object with the current information about the sticks, accelerometers, gyroscopes, buttons, and touch screen. It is safe to invoke this function in a timer for real-time updates.
Touch Screen
The wiiu.gamepad.tpTouch variable indicates whether or not there is currently an active touch on the screen. If this variable is 1, the variables wiiu.gamepad.tpX and wiiu.gamepad.tpY track the coordinates of this touch. The Game Pad's touch screen is not multitouch.
TODO: Document range of tpX and tpY. Determine meaning of tpValidity.
Analog Sticks
The left analog stick is tracked by the wiiu.gamepad.lStickX and wiiu.gamepad.lStickY variables, and the right analog stick is tracked by the wiiu.gamepad.rStickX and wiiu.gamepad.rStickY variables. These values range from -1.0 to +1.0.
Buttons
The variable wiiu.gamepad.held is a bitmask indicating all buttons currently being depressed on the Game Pad, including the click states of the analog sticks. All buttons are represented by in this bitmask although the browser's default behaviors may cause some values to be unusable.
TODO: Record what values in the bitmask correspond to which buttons on the Game Pad.
Accelerometer
The variables wiiu.gamepad.accX, wiiu.gamepad.accY, and wiiu.gamepad.accZ are a vector showing the current acceleration forces on the Game Pad, measured in Gs. When held level and motionless, the force of gravity will cause these variables to contain the vector (0.0, -1.0, 0.0).
Gyroscope
The variables wiiu.gamepad.gyroX, wiiu.gamepad.gyroY, and wiiu.gamepad.gyroZ contain the current readings of the Game Pad gyroscopes.
TODO: Determine range and geometric interpretation of these variables.
Angle
The variables wiiu.gamepad.angleX, wiiu.gamepad.angleY, and wiiu.gamepad.angleZ contain the current angle of the Game Pad.
TODO: Determine range and geometric interpretation of these variables.
Direction Tracking
There are nine variables that tie into the Game Pad's direction tracking, organized into three triplets:
- wiiu.gamepad.dirXx, wiiu.gamepad.dirXy, wiiu.gamepad.dirXz
- wiiu.gamepad.dirYx, wiiu.gamepad.dirYy, wiiu.gamepad.dirYz
- wiiu.gamepad.dirZx, wiiu.gamepad.dirZy, wiiu.gamepad.dirZz
TODO: Determine range and geometric interpretation of these variables. They appear to be rotation-related. Are these triplets transposed? (i.e. are they associated as (dirXx, dirYx, dirZx) instead of (dirXx, dirXy, dirXz)?)
wiiu.remote
The wiiu.remote object allows Javascript functions to read the current state of the primary Wii Remote and its Motion Plus accessory.
TODO: Determine if it's possible to read the accessories and the second through fourth Wii Remotes like the Wii's Internet Channel could.
TODO: Figure out what contentX, contentY, and isDataValid are.
Reading values
In order to read any values from the Wii Remote, input must first be enabled by setting wiiu.remote.isEnabled = 1.
Once enabled, the function wiiu.remote.update() will populate all of the properties on the wiiu.remote object with the current information (about what?). It is safe to invoke this function in a timer for real-time updates.
Buttons
The variable wiiu.remote.held is a bitmask indicating all buttons currently being depressed on the Wii Remote.
TODO: Record what values in the bitmask correspond to which buttons on the Game Pad.
Accelerometer
The variables wiiu.remote.accX, wiiu.remote.accY, and wiiu.remote.accZ are a vector showing the current acceleration forces on the Wii Remote, measured in Gs. When held level and motionless, the force of gravity will cause these variables to contain the vector (0.0, -1.0, 0.0).
D-Pad
TODO: Document.
Motion Plus
TODO: Document.
wiiu.videoplayer
The wiiu.videoplayer object exposes the property viewMode and the function end().
TODO: Figure out what this is and how to use it.
wiiu.imageview
The wiiu.videoplayer object exposes the property viewMode and the functions end() and getErrorCode().
TODO: Figure out what this is and how to use it.