SlideShare a Scribd company logo
Web Apps on Xbox
Bringing Your Web Experience to the Console
Kirupa Chinnathambi | @kirupa
Program Manager
#xboxappdev
1. Web Apps as UWP
2. Designing for the TV
3. Integrating with the platform
4. WebView
5. What’s next!
Agenda
Please ask questions at any time.
I’ll be monitoring the live feed throughout the talk.
#XboxAppDev
Web Apps
XboxAppDev 4. Web Apps on Xbox
1. Built on web technologies
2. Cross-platform / cross-browser
3. Responsive
4. Built using your favorite tools
Web Apps as UWP
XboxAppDev 4. Web Apps on Xbox
To allow you to easily re-use your
skills and assets.
Hosted Web Apps
Your app content is served
from a public URL.
Packaged Web Apps
Your app content is entirely
local and part of your
application.
Hosted Web Apps
Think of it as a thin UWP wrapper
around a supercharged iframe that
displays content from your server.
Think of it as a thin UWP wrapper
around a supercharged iframe that
displays content from your server.
XboxAppDev 4. Web Apps on Xbox
#xboxappdev
Why?
#xboxappdev
UWP apps are fully integrated with
Windows 10.
You have access to native device
capabilities via WinRT APIs.
#xboxappdev
You have many ways to build Hosted Web
Apps. Some popular ones include:
• Visual Studio
• ManifoldJS
• Cordova CLI
XboxAppDev 4. Web Apps on Xbox
XboxAppDev 4. Web Apps on Xbox
Designing for the TV
(aka the 10’ Experience)
#xboxappdev
Unless you explicitly designed for it, your
web apps are optimized for screens that
you hold or sit very close to.
There are a handful of things you can do
to help address that.
#xboxappdev
.xboxBody {
margin: 50px;
}
Create a “TV safe border” of 50 or so pixels. Keep
critical content away from it.
#xboxappdev
You can explicitly check for Xbox via an API like
AnalyticsInfo.
My preference: Check for DPI (150% default zoom),
resolution, whether a controller is connected, etc.
var isGamePadConnected = false;
function checkGamepad() {
if (navigator.getGamepads) {
var gamepads = navigator.getGamepads();
if (gamepads[0]) {
isGamePadConnected = true;
} else {
isGamePadConnected = false;
}
}
requestAnimationFrame(checkGamepad);
}
checkGamepad();
var view = Windows.ApplicationView.GetForCurrentView();
view.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
By default, you will get a black border around the
page. You can remove it with the following WinRT call:
XboxAppDev 4. Web Apps on Xbox
#xboxappdev
Use a library like TVJS to enable directional
navigation easily for your hosted as well as
packaged apps.
(This works on all Windows devices with a
gamepad or keyboard!)
#xboxappdev
You can get TVJS from here: https://aka.ms/tvjs
TVJS makes it especially easy to
quickly focus on elements that aren’t
typically hit targets.
XboxAppDev 4. Web Apps on Xbox
<section>
<div>
<div id="A" class="btn">A</div>
<div id="B" class="btn">B</div>
</div>
<div>
<div id="C" class="btn">C</div>
</div>
<div>
<div id="D" class="btn">D</div>
<div id="E" class="btn">E</div>
</div>
</section>
<section>
<div>
<div id="A" class="btn">A</div>
<div id="B" class="btn">B</div>
</div>
<div>
<div id="C" class="btn">C</div>
</div>
<div>
<div id="D" class="btn">D</div>
<div id="E" class="btn">E</div>
</div>
</section>
<section>
<div>
<div id="A" class="btn">A</div>
<div id="B" class="btn">B</div>
</div>
<div>
<div id="C" class="btn">C</div>
</div>
<div>
<div id="D" class="btn">D</div>
<div id="E" class="btn">E</div>
</div>
</section>
In your JS, just call:
TVJS.DirectionalNavigation.focusableSelectors.push(".btn");
#xboxappdev
Mouse mode is the default controller experience. Same
as the Edge browser on Xbox where:
• Mouse movement is via left thumbstick
• Zoom In / Zoom Out via left / right triggers
• Scrolling via right thumbstick
• You get magnetism support
Mouse Mode
XboxAppDev 4. Web Apps on Xbox
Integrating with the Platform
if (typeof Windows !== "undefined") {
// Windows specific code goes here
}
How to detect if you are in a UWP
environment:
#xboxappdev
This is what makes your web app
really shine and take advantage of
what the Xbox provides beyond
the browser.
#xboxappdev
1. SMTC Integration
2. Background Audio
XboxAppDev 4. Web Apps on Xbox
System Media Transport Controls (SMTC) are the common play, pause,
back, and forward buttons exposed through Windows 10.
SMTC Integration
<video id="mediaVideo" src="img/Westminster_high.mp4" controls></video>
Just add the controls attribute. There is some JS that needs to be added
as well.
No user wants their music to cut out when an app is minimized or
(occasionally) out of focus:
Background Audio
<video id="mediaVideo" src="myVideo.mp4"
msAudioCategory="BackgroundCapableMedia" controls></video>
Add the msAudioCategory attribute to a media element with a value of
BackgroundCapableMedia.
XboxAppDev 4. Web Apps on Xbox
WebView
Think of it is as really fancy/turbocharged
iframe that acts as a window for displaying
HTML content.
WebView is used across UWP apps across
the Windows Platform.
<!DOCTYPE html>
<html>
<head>
<title>Webview Example</title>
<link href="css/default.css" rel="stylesheet" />
</head>
<body>
<x-ms-webview id="webview" src="https://www.bing.com"></x-ms-webview>
<script src="js/main.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>WebView</title>
</head>
<body>
<script>
var webview = document.createElement("x-ms-webview");
webview.navigate("https://www.bing.com");
document.body.appendChild(webview);
</script>
</body>
</html>
XboxAppDev 4. Web Apps on Xbox
There is a whole lot you can do with the
WebView control beyond just displaying
HTML content.
What’s Next!
#xboxappdev
The same under-the-hood
components that power the
Edge browser power the
web experience you get in
UWP apps.
XboxAppDev 4. Web Apps on Xbox
#xboxappdev
Summary
#xboxappdev
If you know how to build a cool web app, then you
know almost everything these is to build an app for
the Xbox (or any other UWP device).
#xboxappdev
Keep in mind ways of progressively enhancing your
app depending on the capabilities available on the
device you are targeting.
If you have any questions, feel free to ping
me via @kirupa or send e-mail to
kirupac@microsoft.com.
XboxAppDev 4. Web Apps on Xbox

More Related Content

PPTX
Build 2017 - B8085 - The road to commercialization for your Windows IoT solution
PPTX
PhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser
PPTX
Web scraping
PDF
Mobile web-debug
PDF
Meguro.dev でのLT資料
PPTX
Build 2017 - B8002 - Introducing Adaptive Cards
PDF
WordPress Security - 12 WordPress Security Fundamentals
TXT
Read me
Build 2017 - B8085 - The road to commercialization for your Windows IoT solution
PhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser
Web scraping
Mobile web-debug
Meguro.dev でのLT資料
Build 2017 - B8002 - Introducing Adaptive Cards
WordPress Security - 12 WordPress Security Fundamentals
Read me

What's hot (19)

PDF
Using composer with WordPress
PDF
Developers, Be a Bada$$ with WP-CLI
KEY
Introduction to Flex Hero for Mobile Devices
PPTX
2016 WC images images images and a Slow website
PDF
Embrace Native Async Nature of JavaScript in WebDriver JS - SeleniumConf Aust...
PPSX
John Overall at Word Camp Victoria 2011
PDF
KGH S2 - Introduction to Kimono
PPTX
How to gain a commercial licensed software every
PDF
Porting Tablet Apps to the Amazon Fire TV
DOCX
GameTako API
PPTX
How To: Bringing Media Channels to Amazon Fire TV
PPTX
WP Suite by Ankur Shukla Review
PDF
KGH S02 Introduction to iMacros
PPTX
Wordcamp2012 build your plugin
PDF
Building Native Experiences with Electron
PDF
Ezcast pro vs Crestron Airmedia vs Barco clickshare vs Latentech wepresent
PDF
KKBOX WWDC17 WatchOS - Dada
PDF
Advanced Jasmine
PPTX
WordPress 3.0 at DC PHP
Using composer with WordPress
Developers, Be a Bada$$ with WP-CLI
Introduction to Flex Hero for Mobile Devices
2016 WC images images images and a Slow website
Embrace Native Async Nature of JavaScript in WebDriver JS - SeleniumConf Aust...
John Overall at Word Camp Victoria 2011
KGH S2 - Introduction to Kimono
How to gain a commercial licensed software every
Porting Tablet Apps to the Amazon Fire TV
GameTako API
How To: Bringing Media Channels to Amazon Fire TV
WP Suite by Ankur Shukla Review
KGH S02 Introduction to iMacros
Wordcamp2012 build your plugin
Building Native Experiences with Electron
Ezcast pro vs Crestron Airmedia vs Barco clickshare vs Latentech wepresent
KKBOX WWDC17 WatchOS - Dada
Advanced Jasmine
WordPress 3.0 at DC PHP
Ad

Viewers also liked (18)

PDF
Internet trends 2013 свежий отчет компании KPCB по интернет трендам 2013 года
PDF
4 alerta cat
PDF
Jurnalistik revisi
PPTX
Ii und introd-deriv.-int
PPTX
JS Skills: From Novice to Guru
PDF
Stanfy MadCode Meetup#6: Apple Watch. First Steps.
PPTX
Build 2016 - P446 - Hosted Web Apps Myth 3 - Hosted Web Apps Aren’t Good for ...
PDF
Organization Performance at Accenture
PPTX
Architecture mobile
PPTX
Build 2016 - P491 - Windows Unlock with IoT Devices
PPTX
What's new in C# 6?
PPTX
PechaKucha - "Siri, start presentation 'HomeKit'"
PPTX
Title sequence 2
PDF
Angular2 with TypeScript
PPTX
Digital in Retail - Burwood Council - Social Media - Jo-Jo Burke
PDF
Session 8 - Xcode 5 and interface builder for iOS 7 application
PDF
Morden F2E Education - Think of Progressive Web Apps
PDF
Introduce Angular2 & render & firebase flow
Internet trends 2013 свежий отчет компании KPCB по интернет трендам 2013 года
4 alerta cat
Jurnalistik revisi
Ii und introd-deriv.-int
JS Skills: From Novice to Guru
Stanfy MadCode Meetup#6: Apple Watch. First Steps.
Build 2016 - P446 - Hosted Web Apps Myth 3 - Hosted Web Apps Aren’t Good for ...
Organization Performance at Accenture
Architecture mobile
Build 2016 - P491 - Windows Unlock with IoT Devices
What's new in C# 6?
PechaKucha - "Siri, start presentation 'HomeKit'"
Title sequence 2
Angular2 with TypeScript
Digital in Retail - Burwood Council - Social Media - Jo-Jo Burke
Session 8 - Xcode 5 and interface builder for iOS 7 application
Morden F2E Education - Think of Progressive Web Apps
Introduce Angular2 & render & firebase flow
Ad

Similar to XboxAppDev 4. Web Apps on Xbox (20)

PPTX
Xbox App Dev 5. Design for TV
PPTX
XboxAppDev 6. Dev Center Publishing UWP Apps
PPTX
XboxAppDev 1. Kick Off
PPTX
Маргарита Остапчук (Microsoft Украина) «Разработка на универсальной платформе...
PPTX
Windows 10 UWP Development Overview
PDF
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
PPTX
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
PDF
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
PPTX
Be More than Mobile (MWC16)
PDF
The Opportunity of Windows Norwich Indie Dev
PPTX
XboxAppDev 3. XAML apps on Xbox
PPTX
데브멘토 발표세미나
PPTX
Build 2016 - B877 - Windows Store and Dev Center Overview: New Capabilities f...
PDF
What Web Developers Need to Know to Develop Windows 8 Apps
PPTX
Intro to Windows Presentation for CSS NC-2.pptx
PDF
Win j svsphonegap-damyan-petev-mihail-mateev
PDF
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
PPTX
WP7 HUB_Overview and application platform
PPTX
Windows Phone 7
PPSX
All About Asp Net 4 0 Hosam Kamel
Xbox App Dev 5. Design for TV
XboxAppDev 6. Dev Center Publishing UWP Apps
XboxAppDev 1. Kick Off
Маргарита Остапчук (Microsoft Украина) «Разработка на универсальной платформе...
Windows 10 UWP Development Overview
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Be More than Mobile (MWC16)
The Opportunity of Windows Norwich Indie Dev
XboxAppDev 3. XAML apps on Xbox
데브멘토 발표세미나
Build 2016 - B877 - Windows Store and Dev Center Overview: New Capabilities f...
What Web Developers Need to Know to Develop Windows 8 Apps
Intro to Windows Presentation for CSS NC-2.pptx
Win j svsphonegap-damyan-petev-mihail-mateev
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
WP7 HUB_Overview and application platform
Windows Phone 7
All About Asp Net 4 0 Hosam Kamel

Recently uploaded (20)

PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
L1 - Introduction to python Backend.pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Transform Your Business with a Software ERP System
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Operating system designcfffgfgggggggvggggggggg
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms I-SECS-1021-03
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
L1 - Introduction to python Backend.pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Computer Software and OS of computer science of grade 11.pptx
Nekopoi APK 2025 free lastest update
How to Choose the Right IT Partner for Your Business in Malaysia
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Monitoring Stack: Grafana, Loki & Promtail
Navsoft: AI-Powered Business Solutions & Custom Software Development
Digital Systems & Binary Numbers (comprehensive )
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Transform Your Business with a Software ERP System

XboxAppDev 4. Web Apps on Xbox

  • 1. Web Apps on Xbox Bringing Your Web Experience to the Console Kirupa Chinnathambi | @kirupa Program Manager
  • 2. #xboxappdev 1. Web Apps as UWP 2. Designing for the TV 3. Integrating with the platform 4. WebView 5. What’s next! Agenda
  • 3. Please ask questions at any time. I’ll be monitoring the live feed throughout the talk. #XboxAppDev
  • 6. 1. Built on web technologies 2. Cross-platform / cross-browser 3. Responsive 4. Built using your favorite tools
  • 9. To allow you to easily re-use your skills and assets.
  • 10. Hosted Web Apps Your app content is served from a public URL. Packaged Web Apps Your app content is entirely local and part of your application.
  • 12. Think of it as a thin UWP wrapper around a supercharged iframe that displays content from your server.
  • 13. Think of it as a thin UWP wrapper around a supercharged iframe that displays content from your server.
  • 16. #xboxappdev UWP apps are fully integrated with Windows 10. You have access to native device capabilities via WinRT APIs.
  • 17. #xboxappdev You have many ways to build Hosted Web Apps. Some popular ones include: • Visual Studio • ManifoldJS • Cordova CLI
  • 20. Designing for the TV (aka the 10’ Experience)
  • 21. #xboxappdev Unless you explicitly designed for it, your web apps are optimized for screens that you hold or sit very close to. There are a handful of things you can do to help address that.
  • 22. #xboxappdev .xboxBody { margin: 50px; } Create a “TV safe border” of 50 or so pixels. Keep critical content away from it.
  • 23. #xboxappdev You can explicitly check for Xbox via an API like AnalyticsInfo. My preference: Check for DPI (150% default zoom), resolution, whether a controller is connected, etc.
  • 24. var isGamePadConnected = false; function checkGamepad() { if (navigator.getGamepads) { var gamepads = navigator.getGamepads(); if (gamepads[0]) { isGamePadConnected = true; } else { isGamePadConnected = false; } } requestAnimationFrame(checkGamepad); } checkGamepad();
  • 25. var view = Windows.ApplicationView.GetForCurrentView(); view.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); By default, you will get a black border around the page. You can remove it with the following WinRT call:
  • 27. #xboxappdev Use a library like TVJS to enable directional navigation easily for your hosted as well as packaged apps. (This works on all Windows devices with a gamepad or keyboard!)
  • 28. #xboxappdev You can get TVJS from here: https://aka.ms/tvjs
  • 29. TVJS makes it especially easy to quickly focus on elements that aren’t typically hit targets.
  • 31. <section> <div> <div id="A" class="btn">A</div> <div id="B" class="btn">B</div> </div> <div> <div id="C" class="btn">C</div> </div> <div> <div id="D" class="btn">D</div> <div id="E" class="btn">E</div> </div> </section>
  • 32. <section> <div> <div id="A" class="btn">A</div> <div id="B" class="btn">B</div> </div> <div> <div id="C" class="btn">C</div> </div> <div> <div id="D" class="btn">D</div> <div id="E" class="btn">E</div> </div> </section>
  • 33. <section> <div> <div id="A" class="btn">A</div> <div id="B" class="btn">B</div> </div> <div> <div id="C" class="btn">C</div> </div> <div> <div id="D" class="btn">D</div> <div id="E" class="btn">E</div> </div> </section>
  • 34. In your JS, just call: TVJS.DirectionalNavigation.focusableSelectors.push(".btn");
  • 35. #xboxappdev Mouse mode is the default controller experience. Same as the Edge browser on Xbox where: • Mouse movement is via left thumbstick • Zoom In / Zoom Out via left / right triggers • Scrolling via right thumbstick • You get magnetism support Mouse Mode
  • 38. if (typeof Windows !== "undefined") { // Windows specific code goes here } How to detect if you are in a UWP environment:
  • 39. #xboxappdev This is what makes your web app really shine and take advantage of what the Xbox provides beyond the browser.
  • 42. System Media Transport Controls (SMTC) are the common play, pause, back, and forward buttons exposed through Windows 10. SMTC Integration <video id="mediaVideo" src="img/Westminster_high.mp4" controls></video> Just add the controls attribute. There is some JS that needs to be added as well.
  • 43. No user wants their music to cut out when an app is minimized or (occasionally) out of focus: Background Audio <video id="mediaVideo" src="myVideo.mp4" msAudioCategory="BackgroundCapableMedia" controls></video> Add the msAudioCategory attribute to a media element with a value of BackgroundCapableMedia.
  • 46. Think of it is as really fancy/turbocharged iframe that acts as a window for displaying HTML content. WebView is used across UWP apps across the Windows Platform.
  • 47. <!DOCTYPE html> <html> <head> <title>Webview Example</title> <link href="css/default.css" rel="stylesheet" /> </head> <body> <x-ms-webview id="webview" src="https://www.bing.com"></x-ms-webview> <script src="js/main.js"></script> </body> </html>
  • 48. <!DOCTYPE html> <html> <head> <title>WebView</title> </head> <body> <script> var webview = document.createElement("x-ms-webview"); webview.navigate("https://www.bing.com"); document.body.appendChild(webview); </script> </body> </html>
  • 50. There is a whole lot you can do with the WebView control beyond just displaying HTML content.
  • 52. #xboxappdev The same under-the-hood components that power the Edge browser power the web experience you get in UWP apps.
  • 56. #xboxappdev If you know how to build a cool web app, then you know almost everything these is to build an app for the Xbox (or any other UWP device).
  • 57. #xboxappdev Keep in mind ways of progressively enhancing your app depending on the capabilities available on the device you are targeting.
  • 58. If you have any questions, feel free to ping me via @kirupa or send e-mail to kirupac@microsoft.com.