SlideShare a Scribd company logo
WebRTC & Firefox OS
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
@robertnyman
Mozilla is a
global non-
profit dedicated
to putting you
in control of
your online
experience and
shaping the
future of the
Web for the
public good
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
WebRTC
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
var video = document.querySelector('video');
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia || navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
window.URL = window.URL || window.webkitURL || window.mozURL ||
window.msURL;
// Call the getUserMedia method with our callback functions
if (navigator.getUserMedia) {
navigator.getUserMedia({video: true}, successCallback, errorCallback);
} else {
console.log('Native web camera streaming (getUserMedia) not supported
in this browser.');
// Display a friendly "sorry" message to the user
}
function successCallback(stream) {
// Set the source of the video element with the stream from the camera
if (video.mozSrcObject !== undefined) {
video.mozSrcObject = stream;
} else {
video.src = (window.URL && window.URL.createObjectURL(stream)) ||
stream;
}
video.play();
}
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
Firefox & WebRTC status
"Fix a lot of bugs and improve quality"
First implementation in Firefox 22,
including DataChannels
TURN support for Desktop in Firefox 23
Audio recording support. We hope to
get it landed in Firefox 24
We haven't started working on video
recording
Desktop
Stretch goal of shipping WebRTC (pref'd
on) in Firefox 24 -- though Firefox 25 is
more likely.
It is already in Firefox 23 for Android,
but behind a pref (the same pref that
desktop was behind)
Android
We're starting to get WebRTC
functioning on Firefox OS. gUM will
come first.
Since Firefox OS doesn't ship on the
train system, the initial code for this will
likely ship later in the year (sometime
after Firefox OS v1.1)
Firefox OS
Persona/Identity integration
BUNDLE
SDP renegotiation via new
offer/answer pair
Statistics API (at least the
framework for it)
persistent permissions
support more than 1 audio
flow and 1 video flow
Roadmap
Using HTML5, CSS and
JavaScript together with a
number of APIs to build
apps and customize the UI.
Firefox OS
A walk in the park
Open Web Apps
Build excellent interfaces!
Packaged vs. Hosted Apps
WebAPIs
WebRTC & Firefox OS - presentation at Google
Security Levels
Web Content
Regular web content
Installed Web App
A regular web app
Privileged Web App
More access, more responsibility
Certified Web App
Device-critical applications
https://wiki.mozilla.org/
WebAPI#Planned_for_initial_release_of_B2G_.
28aka_Basecamp.29
"permissions": {
"contacts": {
"description": "Required for autocompletion in the share screen",
"access": "readcreate"
},
"alarms": {
"description": "Required to schedule notifications"
}
}
PERMISSIONS
Vibration API (W3C)
Screen Orientation
Geolocation API
Mouse Lock API (W3C)
Open WebApps
Network Information API (W3C)
Battery Status API (W3C)
Alarm API
Web Activities
Push Notifications API
WebFM API
WebPayment
IndexedDB (W3C)
Ambient light sensor
Proximity sensor
Notification
REGULAR APIS
BATTERY STATUS
API
var battery = navigator.battery;
if (battery) {
var batteryLevel = Math.round(battery.level * 100) + "%",
charging = (battery.charging)? "" : "not ",
chargingTime = parseInt(battery.chargingTime / 60, 10),
dischargingTime = parseInt(battery.dischargingTime / 60, 10);
// Set events
battery.addEventListener("levelchange", setStatus, false);
battery.addEventListener("chargingchange", setStatus, false);
battery.addEventListener("chargingtimechange", setStatus, false);
battery.addEventListener("dischargingtimechange", setStatus, false);
}
SCREEN
ORIENTATION API
// Portrait mode:
screen.mozLockOrientation("portrait");
/*
Possible values:
"landscape"
"portrait"
"landscape-primary"
"landscape-secondary"
"portrait-primary"
"portrait-secondary"
*/
VIBRATION API
// Vibrate for one second
navigator.vibrate(1000);
// Vibration pattern [vibrationTime, pause,…]
navigator.vibrate([200, 100, 200, 100]);
// Vibrate for 5 seconds
navigator.vibrate(5000);
// Turn off vibration
navigator.vibrate(0);
DEVICEPROXIMITY
window.addEventListener("deviceproximity", function (event) {
// Current device proximity, in centimeters
console.log(event.value);
// The maximum sensing distance the sensor is
// able to report, in centimeters
console.log(event.max);
// The minimum sensing distance the sensor is
// able to report, in centimeters
console.log(event.min);
});
AMBIENT LIGHT
EVENTS
window.addEventListener("devicelight", function (event) {
// The lux values for "dim" typically begin below 50,
// and the values for "bright" begin above 10000
console.log(event.value);
});
Device Storage API
Browser API
TCP Socket API
Contacts API
systemXHR
PRIVILEGED APIS
DEVICE STORAGE
API
var deviceStorage = navigator.getDeviceStorage("videos");
// "external", "shared", or "default".
deviceStorage.type;
// Add a file - returns DOMRequest with file name
deviceStorage.add(blob);
// Same as .add, with provided name
deviceStorage.addNamed(blob, name);
// Returns DOMRequest/non-editable File object
deviceStorage.get(name);
// Returns editable FileHandle object
deviceStorage.getEditable(name);
// Returns DOMRequest with success or failure
deviceStorage.delete(name);
// Enumerates files
deviceStorage.enumerate([directory]);
// Enumerates files as FileHandles
deviceStorage.enumerateEditable([directory]);
var storage = navigator.getDeviceStorage("videos"),
cursor = storage.enumerate();
cursor.onerror = function() {
console.error("Error in DeviceStorage.enumerate()", cursor.error.name);
};
cursor.onsuccess = function() {
if (!cursor.result)
return;
var file = cursor.result;
// If this isn't a video, skip it
if (file.type.substring(0, 6) !== "video/") {
cursor.continue();
return;
}
// If it isn't playable, skip it
var testplayer = document.createElement("video");
if (!testplayer.canPlayType(file.type)) {
cursor.continue();
return;
}
};
WEB ACTIVITIES
Interacting with the camera
WebRTC & Firefox OS - presentation at Google
var activity = new MozActivity({
name: "view",
data: {
type: "image/png",
url: ...
}
});
activity.onsuccess = function () {
console.log("Showing the image!");
};
activity.onerror = function () {
console.log("Can't view the image!");
};
{
"activities": {
"share": {
"filters": {
"type": ["image/png", "image/gif"]
}
"href": "sharing.html",
"disposition": "window"
}
}
}
navigator.mozSetMessageHandler("activity", function (a) {
var img = getImageObject();
img.src = a.source.url;
// Call a.postResult() or a.postError() if
// the activity should return a value
});
Future APIs
WebRTC & Firefox OS - presentation at Google
Resource lock API
UDP Datagram Socket API
Peer to Peer API
WebNFC
WebUSB
HTTP-cache API
Calendar API
Spellcheck API
LogAPI
Keyboard/IME API
WebRTC
FileHandle API
Sync API
Web Apps from Mozilla
WebRTC & Firefox OS - presentation at Google
Dialer
Contacts
Settings
SMS
Web browser
Gallery
Video Player
Music Player
E-mail (POP, IMAP)
Calendar
Alarm Clock
Camera
Notes
First Run Experience
Notifications
Home Screen
Mozilla Marketplace
System Updater
Localization Support
WebRTC & Firefox OS - presentation at Google
Get started
https://addons.mozilla.org/firefox/addon/firefox-os-
simulator/
FIREFOX OS
BOILERPLATE APP
https://github.com/robnyman/Firefox-OS-Boilerplate-App
https://marketplace.firefox.com/
https://marketplace.firefox.com/developers/
Trying things out
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
Go have some fun!
Robert Nyman
robertnyman.com
robert@mozilla.com
Mozilla
@robertnyman

More Related Content

What's hot (20)

KEY
Intro To webOS
fpatton
 
PPS
J web socket
Hiroshi Ochi
 
PPTX
Enhancing Mobile User Experience with WebSocket
Mauricio "Maltron" Leal
 
PDF
Making the HTML5 Video element interactive
Charles Hudson
 
PPT
Developing Applications for WebOS
Chuq Von Rospach
 
PPTX
Welcome Firefox OS in india with your app - Mumbai Firefox OS hackathon - 201...
Frédéric Harper
 
PDF
Deploying configurable frontend web application containers
José Moreira
 
KEY
Node worshop Realtime - Socket.io
Caesar Chi
 
PDF
[cssdevconf] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
PDF
WEB SOCKET 應用
Jerromy Lee
 
PDF
Meetup Performance
Greg Whalin
 
KEY
#NewMeetup Performance
Justin Cataldo
 
PDF
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
PDF
Velocity 2014 nyc WebPagetest private instances
Patrick Meenan
 
PPT
HTML5 WebSocket: The New Network Stack for the Web
Peter Lubbers
 
PDF
Web versus Native: round 1!
Chris Mills
 
PPTX
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Diana Thompson
 
PDF
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Jérémy Derussé
 
PDF
APIs for modern web apps
Chris Mills
 
PDF
WebPagetest - Good, Bad & Ugly
Aaron Peters
 
Intro To webOS
fpatton
 
J web socket
Hiroshi Ochi
 
Enhancing Mobile User Experience with WebSocket
Mauricio "Maltron" Leal
 
Making the HTML5 Video element interactive
Charles Hudson
 
Developing Applications for WebOS
Chuq Von Rospach
 
Welcome Firefox OS in india with your app - Mumbai Firefox OS hackathon - 201...
Frédéric Harper
 
Deploying configurable frontend web application containers
José Moreira
 
Node worshop Realtime - Socket.io
Caesar Chi
 
[cssdevconf] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
WEB SOCKET 應用
Jerromy Lee
 
Meetup Performance
Greg Whalin
 
#NewMeetup Performance
Justin Cataldo
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
Velocity 2014 nyc WebPagetest private instances
Patrick Meenan
 
HTML5 WebSocket: The New Network Stack for the Web
Peter Lubbers
 
Web versus Native: round 1!
Chris Mills
 
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Diana Thompson
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Jérémy Derussé
 
APIs for modern web apps
Chris Mills
 
WebPagetest - Good, Bad & Ugly
Aaron Peters
 

Similar to WebRTC & Firefox OS - presentation at Google (20)

PDF
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Robert Nyman
 
PDF
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Robert Nyman
 
PDF
Firefox OS workshop, JSFoo, India
Robert Nyman
 
PDF
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Robert Nyman
 
PDF
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Robert Nyman
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS, JSFoo, India
Robert Nyman
 
PDF
APIs, now and in the future
Chris Mills
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - SpainJS
Robert Nyman
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Robert Nyman
 
PDF
Firefox OS workshop, Colombia
Robert Nyman
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
Robert Nyman
 
PDF
Fixing the mobile web - Internet World Romania
Christian Heilmann
 
PDF
(Christian heilman) firefox
NAVER D2
 
PDF
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
Frédéric Harper
 
PDF
Web APIs & Apps - Mozilla
Robert Nyman
 
PDF
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Frédéric Harper
 
PDF
Firefox OS and the Internet of Things - NDC London 2014
Jan Jongboom
 
PDF
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
Frédéric Harper
 
PDF
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Frédéric Harper
 
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Robert Nyman
 
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Robert Nyman
 
Firefox OS workshop, JSFoo, India
Robert Nyman
 
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Robert Nyman
 
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Robert Nyman
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS, JSFoo, India
Robert Nyman
 
APIs, now and in the future
Chris Mills
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - SpainJS
Robert Nyman
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Robert Nyman
 
Firefox OS workshop, Colombia
Robert Nyman
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
Robert Nyman
 
Fixing the mobile web - Internet World Romania
Christian Heilmann
 
(Christian heilman) firefox
NAVER D2
 
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
Frédéric Harper
 
Web APIs & Apps - Mozilla
Robert Nyman
 
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Frédéric Harper
 
Firefox OS and the Internet of Things - NDC London 2014
Jan Jongboom
 
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
Frédéric Harper
 
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Frédéric Harper
 
Ad

More from Robert Nyman (20)

PDF
Have you tried listening?
Robert Nyman
 
PDF
Building for Your Next Billion - Google I/O 2017
Robert Nyman
 
PDF
Introduction to Google Daydream
Robert Nyman
 
PDF
Predictability for the Web
Robert Nyman
 
PDF
The Future of Progressive Web Apps - View Source conference, Berlin 2016
Robert Nyman
 
PDF
The Future of the Web - Cold Front conference 2016
Robert Nyman
 
PDF
The Future of Progressive Web Apps - Google for Indonesia
Robert Nyman
 
PDF
Google tech & products
Robert Nyman
 
PDF
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Robert Nyman
 
PDF
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go - keynote at Riga D...
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go - Istanbul
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go
Robert Nyman
 
PDF
Google, the future and possibilities
Robert Nyman
 
PDF
Developer Relations in the Nordics
Robert Nyman
 
PDF
What is Developer Relations?
Robert Nyman
 
PDF
Android TV Introduction - Stockholm Android TV meetup
Robert Nyman
 
PDF
New improvements for web developers - frontend.fi, Helsinki
Robert Nyman
 
PDF
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
Robert Nyman
 
Have you tried listening?
Robert Nyman
 
Building for Your Next Billion - Google I/O 2017
Robert Nyman
 
Introduction to Google Daydream
Robert Nyman
 
Predictability for the Web
Robert Nyman
 
The Future of Progressive Web Apps - View Source conference, Berlin 2016
Robert Nyman
 
The Future of the Web - Cold Front conference 2016
Robert Nyman
 
The Future of Progressive Web Apps - Google for Indonesia
Robert Nyman
 
Google tech & products
Robert Nyman
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Robert Nyman
 
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Robert Nyman
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
Robert Nyman
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
Robert Nyman
 
The web - What it has, what it lacks and where it must go - Istanbul
Robert Nyman
 
The web - What it has, what it lacks and where it must go
Robert Nyman
 
Google, the future and possibilities
Robert Nyman
 
Developer Relations in the Nordics
Robert Nyman
 
What is Developer Relations?
Robert Nyman
 
Android TV Introduction - Stockholm Android TV meetup
Robert Nyman
 
New improvements for web developers - frontend.fi, Helsinki
Robert Nyman
 
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
Robert Nyman
 
Ad

Recently uploaded (20)

PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 

WebRTC & Firefox OS - presentation at Google