SlideShare a Scribd company logo
1 of 106
Download to read offline
Bringing the Open Web & APIs to
 mobile devices with Firefox OS
@robertnyman
Firefox OS




  Using HTML5, CSS and
  JavaScript together with a
  number of APIs to build
  apps and customize the UI.
Open Web Apps
https://developer.mozilla.org/docs/Apps/Getting_Started
Steps to Take
Develop Web App using
1.   HTML5, CSS, & Javascript


2.   Create an app manifest ļ¬le



3.   Publish/install the app
1.
Develop Web App using
HTML5, CSS & JavaScript
Reuse any existing web site/app or develop from scratch with open
                          web standards.

   Utilize HTML5 features such as localStorage, oļ¬„ine manifest,
         IndexedDB and access Web APIs for more options.

  Responsive web design for adapting to varying resolutions and
                      screen orientation.
2.
Create an app manifest ļ¬le
Create a ļ¬le with a .webapp extension
{
  "version": "1.0",
  "name": "MozillaBall",
  "description": "Exciting Open Web development action!",
  "icons": {
     "16": "/img/icon-16.png",
     "48": "/img/icon-48.png",
     "128": "/img/icon-128.png"
  },
  "developer": {
     "name": "Mozilla Labs",
     "url": "http://mozillalabs.com"
  },
  "installs_allowed_from": ["*"],
  "appcache_path": "/cache.manifest",
  "locales": {
     "es": {
        "description": "Ā”AcciĆ³n abierta emocionante del desarrollo del Web!",
        "developer": {
          "url": "http://es.mozillalabs.com/"
        }
     },
     "it": {
        "description": "Azione aperta emozionante di sviluppo di
fotoricettore!",
        "developer": {
          "url": "http://it.mozillalabs.com/"
        }
     }
  },
  "default_locale": "en"
}
MANIFEST CHECKER
   http://appmanifest.org/
Serve with Content-type/MIME type:

application/x-web-app-manifest+json
Apache - in mime.types:

application/x-web-app-manifest+json webapp



Apache - in .htaccess:

AddType application/x-web-app-manifest+json webapp



NGinx - in mime.types:

types {
  text/html   html htm shtml;
  text/css    css;
  text/xml    xml;
  application/x-web-app-manifest+json   webapp;
}
IIS:

In IIS Manager, right-click the local
computer, and click Properties.

Click the MIME Types button.

Click New.

In the Extension box, type the ļ¬le name
extension.

In the MIME type box, type a description
that exactly matches the ļ¬le type deļ¬ned
on the computer.

Click OK.
curl -I http://mozillalabs.com/manifest.webapp
3.
Publish/install the app
Firefox Marketplace
https://marketplace.firefox.com/
https://marketplace.firefox.com/developers/
Installing/hosting the app
var request = navigator.mozApps.install(
   "http://mozillalabs.com/MozillaBall.webapp",
   {
     user_id: "some_user"
   }
);

request.onsuccess = function() {
  // Success! Notiļ¬cation, launch page etc
}

request.onerror = function() {
  // Failed. this.error.name has details
}
Packaged vs. Hosted Apps
A packaged app is an Open Web App that has all of its resources
(HTML, CSS, JavaScript, app manifest, and so on) contained in a zip
       ļ¬le, instead of having its resources on a Web server.

A packaged app is simply a zip ļ¬le with the app manifest in its root
    directory. The manifest must be named manifest.webapp.
Can be privileged apps with more API access than hosted apps

Resources are accessed from the zip ļ¬le, which is stored on the device where the
app is installed)

Enforce a speciļ¬c Content Security Policy for all application content

Can embed remote content in iframes, but that content will not have access to
privileged APIs nor will it have the default CSP applied to it
https://developer.mozilla.org/docs/Apps/
          For_Web_developers
WebAPIs
https://wiki.mozilla.org/WebAPI
Security Levels
Web Content                        Certiļ¬ed Web App

Regular web content                Device-critical applications

Installed Web App

A regular web app

Privileged Web App

More access, more responsibility
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)             Web Activities
Screen Orientation              Push Notiļ¬cations API
Geolocation API                 WebFM API
Mouse Lock API (W3C)            WebPayment
Open WebApps                    IndexedDB (W3C)
Network Information API (W3C)   Ambient light sensor
Battery Status API (W3C)        Proximity sensor
Alarm API                       Notiļ¬cation




                       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);
}
NOTIFICATION
var notification = navigator.mozNotification;
notification.createNotification(
    "See this",
    "This is a notification",
    iconURL
);
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);
WEB PAYMENTS
var pay = navigator.mozPay(paymentToken);
pay.onsuccess = function (event) {
    // Weee! Money!
};
NETWORK
INFORMATION API
var connection = window.navigator.mozConnection,
    online = connection.bandwidth > 0,
    metered = connection.metered;
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 level of the ambient light in lux
    console.log(event.value);
});
window.addEventListener("lightlevel", function (event) {
    // Possible values: "normal", "bright", "dim"
    console.log(event.value);
});
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;
     }
};
CONTACTS API
var contact = new mozContact();
contact.init({name: "Tom"});

var request = navigator.mozContacts.save(contact);
request.onsuccess = function() {
    console.log("Success");
};

request.onerror = function() {
    console.log("Error")
};
WebTelephony                    WebBluetooth
WebSMS                          Permissions API
Idle API                        Network Stats API
Settings API                    Camera API
Power Management API            Time/Clock API
Mobile Connection API           Attention screen
WiFi Information API            Voicemail




                        CERTIFIED APIS
WEBTELEPHONY
// Telephony object
var tel = navigator.mozTelephony;

// Check if the phone is muted (read/write property)
console.log(tel.muted);

// Check if the speaker is enabled (read/write property)
console.log(tel.speakerEnabled);
// Place a call
var cal = tel.dial(ā€œ123456789ā€);
// Receiving a call
tel.onincoming = function (event) {
    var incomingCall = event.call;

     // Get the number of the incoming call
     console.log(incomingCall.number);

     // Answer the call
     incomingCall.answer();
};

// Disconnect a call
call.hangUp();



// Iterating over calls, and taking action depending on their
changed status
tel.oncallschanged = function (event) {
    tel.calls.forEach(function (call) {
        // Log the state of each call
        console.log(call.state);
    });
};
WEBSMS
// SMS object
var sms = navigator.mozSMS;

// Send a message
sms.send("123456789", "Hello world!");
// Recieve a message
sms.onreceived = function (event) {
    // Read message
    console.log(event.message);
};
WEB ACTIVITIES
{
    "activities": {
        "share": {
            "filters": {
                "type": ["image/png", "image/gif"]
            }
            "href": "sharing.html",
            "disposition": "window"
        }
    }
}
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!");
};
var register = navigator.mozRegisterActivityHandler({
    name: "view",
    disposition: "inline",
    filters: {
        type: "image/png"
    }
});

register.onerror = function () {
    console.log("Failed to register activity");
}
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
Resource lock API         Spellcheck API
UDP Datagram Socket API   LogAPI
Peer to Peer API          Keyboard/IME API
WebNFC                    WebRTC
WebUSB                    FileHandle API
HTTP-cache API            Sync API
Calendar API
Web Apps from Mozilla
Dialer               Alarm Clock

Contacts             Camera

Settings             Notes

SMS                  First Run Experience

Web browser          Notiļ¬cations

Gallery              Home Screen

Video Player         Mozilla Marketplace

Music Player         System Updater

E-mail (POP, IMAP)   Localization Support

Calendar
https://hacks.mozilla.org/2013/01/hacking-gaia-for-ļ¬refox-
                         os-part-1/
Get started
https://addons.mozilla.org/ļ¬refox/addon/ļ¬refox-os-
                    simulator/
FIREFOX OS
                        BOILERPLATE APP



https://github.com/robnyman/Firefox-OS-Boilerplate-App
WebRTC
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();
}
Getting help
https://lists.mozilla.org/listinfo/dev-webapps

             irc://irc.mozilla.org/
               #openwebapps
Trying things out
Robert Nyman
robertnyman.com
robert@mozilla.com
Mozilla

   @robertnyman

More Related Content

What's hot

20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
Frank Rousseau
Ā 
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
Patrick Lauke
Ā 
developing Xul
developing Xuldeveloping Xul
developing Xul
Daewoong Kim
Ā 

What's hot (20)

JQuery UK Service Workers Talk
JQuery UK Service Workers TalkJQuery UK Service Workers Talk
JQuery UK Service Workers Talk
Ā 
JQuery UK February 2015: Service Workers On Vacay
JQuery UK February 2015: Service Workers On VacayJQuery UK February 2015: Service Workers On Vacay
JQuery UK February 2015: Service Workers On Vacay
Ā 
Connect.js - Exploring React.Native
Connect.js - Exploring React.NativeConnect.js - Exploring React.Native
Connect.js - Exploring React.Native
Ā 
WebAPIs + Brick - WebBR2013
WebAPIs + Brick - WebBR2013WebAPIs + Brick - WebBR2013
WebAPIs + Brick - WebBR2013
Ā 
How to Win on the Apple Watch
How to Win on the Apple WatchHow to Win on the Apple Watch
How to Win on the Apple Watch
Ā 
Connect.js 2015 - Building Native Mobile Applications with Javascript
Connect.js 2015 - Building Native Mobile Applications with JavascriptConnect.js 2015 - Building Native Mobile Applications with Javascript
Connect.js 2015 - Building Native Mobile Applications with Javascript
Ā 
Android swedroid
Android swedroidAndroid swedroid
Android swedroid
Ā 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
Ā 
Search and play more than 50 clips
Search and play more than 50 clipsSearch and play more than 50 clips
Search and play more than 50 clips
Ā 
Finding Concurrency Errors in Event-Driven Applications - Strangeloop'14
Finding Concurrency Errors in Event-Driven Applications - Strangeloop'14Finding Concurrency Errors in Event-Driven Applications - Strangeloop'14
Finding Concurrency Errors in Event-Driven Applications - Strangeloop'14
Ā 
What's new in Rails 4
What's new in Rails 4What's new in Rails 4
What's new in Rails 4
Ā 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
Ā 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.js
Ā 
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
Ā 
Titanium - Making the most of your single thread
Titanium - Making the most of your single threadTitanium - Making the most of your single thread
Titanium - Making the most of your single thread
Ā 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
Ā 
Advanced Mac Software Deployment and Configuration: Just Make It Work!
Advanced Mac Software Deployment and Configuration: Just Make It Work!Advanced Mac Software Deployment and Configuration: Just Make It Work!
Advanced Mac Software Deployment and Configuration: Just Make It Work!
Ā 
developing Xul
developing Xuldeveloping Xul
developing Xul
Ā 
feature flagging with rails engines v0.2
feature flagging with rails engines v0.2 feature flagging with rails engines v0.2
feature flagging with rails engines v0.2
Ā 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
Ā 

Viewers also liked

Eleuthera island
Eleuthera islandEleuthera island
Eleuthera island
Sloth27
Ā 
Brazilian Pipeline Community
Brazilian Pipeline CommunityBrazilian Pipeline Community
Brazilian Pipeline Community
drihansen
Ā 
Abogado, asesor, consultor litigante administrador de empresas inocencio mele...
Abogado, asesor, consultor litigante administrador de empresas inocencio mele...Abogado, asesor, consultor litigante administrador de empresas inocencio mele...
Abogado, asesor, consultor litigante administrador de empresas inocencio mele...
M&s Consultorƭas Legal Entreprise Austral Group. Inocencio MelƩndez Julio.
Ā 
Los tehuelches Giuli.
Los tehuelches Giuli.Los tehuelches Giuli.
Los tehuelches Giuli.
sugiambruni
Ā 

Viewers also liked (20)

0800z Royalty Finance Invitation
0800z Royalty Finance Invitation0800z Royalty Finance Invitation
0800z Royalty Finance Invitation
Ā 
Conexa ComunicaĆ§Ć£o
Conexa ComunicaĆ§Ć£oConexa ComunicaĆ§Ć£o
Conexa ComunicaĆ§Ć£o
Ā 
Mittelstand im Mittelpunkt: High End eCommerce
Mittelstand im Mittelpunkt: High End eCommerceMittelstand im Mittelpunkt: High End eCommerce
Mittelstand im Mittelpunkt: High End eCommerce
Ā 
Baso 11-ybk-final
Baso 11-ybk-finalBaso 11-ybk-final
Baso 11-ybk-final
Ā 
Aieee pt 5 2012
Aieee pt 5 2012Aieee pt 5 2012
Aieee pt 5 2012
Ā 
PresentaciĆ³n 30segons
PresentaciĆ³n 30segons PresentaciĆ³n 30segons
PresentaciĆ³n 30segons
Ā 
Eleuthera island
Eleuthera islandEleuthera island
Eleuthera island
Ā 
Voces masculinas
Voces masculinasVoces masculinas
Voces masculinas
Ā 
Palmera final-22 de agosto- copia enviada a imprenta.
Palmera final-22 de agosto- copia enviada a imprenta.Palmera final-22 de agosto- copia enviada a imprenta.
Palmera final-22 de agosto- copia enviada a imprenta.
Ā 
Lazer e Diferenciais - Ph.D Personal Home Design - Barra Funda/SP
Lazer e Diferenciais - Ph.D Personal Home Design - Barra Funda/SPLazer e Diferenciais - Ph.D Personal Home Design - Barra Funda/SP
Lazer e Diferenciais - Ph.D Personal Home Design - Barra Funda/SP
Ā 
Kinesis Marketing Social Media Brochure
Kinesis Marketing Social Media BrochureKinesis Marketing Social Media Brochure
Kinesis Marketing Social Media Brochure
Ā 
Devendra_Pawar
Devendra_PawarDevendra_Pawar
Devendra_Pawar
Ā 
CRP0422 - Luz e Gambiarra
CRP0422 - Luz e GambiarraCRP0422 - Luz e Gambiarra
CRP0422 - Luz e Gambiarra
Ā 
06 01 40 no comas carne www.gftaognosticaespiritual.org
06 01 40 no comas carne www.gftaognosticaespiritual.org06 01 40 no comas carne www.gftaognosticaespiritual.org
06 01 40 no comas carne www.gftaognosticaespiritual.org
Ā 
Catedral slp
Catedral slpCatedral slp
Catedral slp
Ā 
Brazilian Pipeline Community
Brazilian Pipeline CommunityBrazilian Pipeline Community
Brazilian Pipeline Community
Ā 
Catalogue produits ƩtanchƩitƩ Isocell 2016
Catalogue produits ƩtanchƩitƩ Isocell 2016Catalogue produits ƩtanchƩitƩ Isocell 2016
Catalogue produits ƩtanchƩitƩ Isocell 2016
Ā 
Abogado, asesor, consultor litigante administrador de empresas inocencio mele...
Abogado, asesor, consultor litigante administrador de empresas inocencio mele...Abogado, asesor, consultor litigante administrador de empresas inocencio mele...
Abogado, asesor, consultor litigante administrador de empresas inocencio mele...
Ā 
An introduction to Zeversolar inverters
An introduction to Zeversolar invertersAn introduction to Zeversolar inverters
An introduction to Zeversolar inverters
Ā 
Los tehuelches Giuli.
Los tehuelches Giuli.Los tehuelches Giuli.
Los tehuelches Giuli.
Ā 

Similar to Bringing the open web and APIs to mobile devices with Firefox OS - Whisky Web, Scotland

WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
Robert Nyman
Ā 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Robert Nyman
Ā 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Robert Nyman
Ā 
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobileFirefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Robert Nyman
Ā 
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open WebMozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
Robert Nyman
Ā 
Firefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄs
Firefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄsFirefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄs
Firefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄs
Robert Nyman
Ā 
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San FranciscoFirefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Robert Nyman
Ā 
Firefox os-introduction
Firefox os-introductionFirefox os-introduction
Firefox os-introduction
zsoltlengyelit
Ā 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
Robert Nyman
Ā 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
Robert Nyman
Ā 
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
FrƩdƩric Harper
Ā 

Similar to Bringing the open web and APIs to mobile devices with Firefox OS - Whisky Web, Scotland (20)

WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
Ā 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Ā 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Ā 
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobileFirefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Ā 
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open WebMozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
Ā 
Firefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄs
Firefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄsFirefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄs
Firefox OS, the Open Web & WebAPIs - Geek Meet VƤsterƄs
Ā 
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San FranciscoFirefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Ā 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
Ā 
Firefox os-introduction
Firefox os-introductionFirefox os-introduction
Firefox os-introduction
Ā 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
Ā 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
Ā 
Firefox OS
Firefox OSFirefox OS
Firefox OS
Ā 
Firefox OS, une plateforme aĢ€ deĢcouvrir - IO Saglac - 2014-09-09
Firefox OS, une plateforme aĢ€ deĢcouvrir - IO Saglac - 2014-09-09Firefox OS, une plateforme aĢ€ deĢcouvrir - IO Saglac - 2014-09-09
Firefox OS, une plateforme aĢ€ deĢcouvrir - IO Saglac - 2014-09-09
Ā 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
Ā 
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
Ā 
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
Ā 
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Ā 
HTML5 WebWorks
HTML5 WebWorksHTML5 WebWorks
HTML5 WebWorks
Ā 
Firefox OS Web APIs, taking it to the next level
Firefox OS Web APIs, taking it to the next levelFirefox OS Web APIs, taking it to the next level
Firefox OS Web APIs, taking it to the next level
Ā 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
Ā 

More from Robert Nyman

More from Robert Nyman (20)

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

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
Ā 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Ā 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Ā 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
Mcleodganj Call Girls šŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls šŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls šŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls šŸ„° 8617370543 Service Offer VIP Hot Model
Ā 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Ā 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Ā 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Ā 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Ā 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Ā 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
Ā 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
Ā 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Ā 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Ā 

Bringing the open web and APIs to mobile devices with Firefox OS - Whisky Web, Scotland

  • 1. Bringing the Open Web & APIs to mobile devices with Firefox OS
  • 2.
  • 3.
  • 4.
  • 6.
  • 7. Firefox OS Using HTML5, CSS and JavaScript together with a number of APIs to build apps and customize the UI.
  • 10.
  • 12. Develop Web App using 1. HTML5, CSS, & Javascript 2. Create an app manifest ļ¬le 3. Publish/install the app
  • 13.
  • 14. 1. Develop Web App using HTML5, CSS & JavaScript
  • 15. Reuse any existing web site/app or develop from scratch with open web standards. Utilize HTML5 features such as localStorage, oļ¬„ine manifest, IndexedDB and access Web APIs for more options. Responsive web design for adapting to varying resolutions and screen orientation.
  • 16. 2. Create an app manifest ļ¬le
  • 17. Create a ļ¬le with a .webapp extension
  • 18. { "version": "1.0", "name": "MozillaBall", "description": "Exciting Open Web development action!", "icons": { "16": "/img/icon-16.png", "48": "/img/icon-48.png", "128": "/img/icon-128.png" }, "developer": { "name": "Mozilla Labs", "url": "http://mozillalabs.com" }, "installs_allowed_from": ["*"], "appcache_path": "/cache.manifest", "locales": { "es": { "description": "Ā”AcciĆ³n abierta emocionante del desarrollo del Web!", "developer": { "url": "http://es.mozillalabs.com/" } }, "it": { "description": "Azione aperta emozionante di sviluppo di fotoricettore!", "developer": { "url": "http://it.mozillalabs.com/" } } }, "default_locale": "en" }
  • 19. MANIFEST CHECKER http://appmanifest.org/
  • 20. Serve with Content-type/MIME type: application/x-web-app-manifest+json
  • 21. Apache - in mime.types: application/x-web-app-manifest+json webapp Apache - in .htaccess: AddType application/x-web-app-manifest+json webapp NGinx - in mime.types: types { text/html html htm shtml; text/css css; text/xml xml; application/x-web-app-manifest+json webapp; }
  • 22. IIS: In IIS Manager, right-click the local computer, and click Properties. Click the MIME Types button. Click New. In the Extension box, type the ļ¬le name extension. In the MIME type box, type a description that exactly matches the ļ¬le type deļ¬ned on the computer. Click OK.
  • 29. var request = navigator.mozApps.install( "http://mozillalabs.com/MozillaBall.webapp", { user_id: "some_user" } ); request.onsuccess = function() { // Success! Notiļ¬cation, launch page etc } request.onerror = function() { // Failed. this.error.name has details }
  • 31. A packaged app is an Open Web App that has all of its resources (HTML, CSS, JavaScript, app manifest, and so on) contained in a zip ļ¬le, instead of having its resources on a Web server. A packaged app is simply a zip ļ¬le with the app manifest in its root directory. The manifest must be named manifest.webapp.
  • 32. Can be privileged apps with more API access than hosted apps Resources are accessed from the zip ļ¬le, which is stored on the device where the app is installed) Enforce a speciļ¬c Content Security Policy for all application content Can embed remote content in iframes, but that content will not have access to privileged APIs nor will it have the default CSP applied to it
  • 37. Web Content Certiļ¬ed Web App Regular web content Device-critical applications Installed Web App A regular web app Privileged Web App More access, more responsibility
  • 39. "permissions": { "contacts": { "description": "Required for autocompletion in the share screen", "access": "readcreate" }, "alarms": { "description": "Required to schedule notifications" } }
  • 41.
  • 42. Vibration API (W3C) Web Activities Screen Orientation Push Notiļ¬cations API Geolocation API WebFM API Mouse Lock API (W3C) WebPayment Open WebApps IndexedDB (W3C) Network Information API (W3C) Ambient light sensor Battery Status API (W3C) Proximity sensor Alarm API Notiļ¬cation REGULAR APIS
  • 44. 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); }
  • 46. var notification = navigator.mozNotification; notification.createNotification( "See this", "This is a notification", iconURL );
  • 48. // Portrait mode: screen.mozLockOrientation("portrait"); /* Possible values: "landscape" "portrait" "landscape-primary" "landscape-secondary" "portrait-primary" "portrait-secondary" */
  • 50. // 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);
  • 52. var pay = navigator.mozPay(paymentToken); pay.onsuccess = function (event) { // Weee! Money! };
  • 54. var connection = window.navigator.mozConnection, online = connection.bandwidth > 0, metered = connection.metered;
  • 56. 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); });
  • 58. window.addEventListener("devicelight", function (event) { // The level of the ambient light in lux console.log(event.value); });
  • 59. window.addEventListener("lightlevel", function (event) { // Possible values: "normal", "bright", "dim" console.log(event.value); });
  • 60. 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); });
  • 61. Device Storage API Browser API TCP Socket API Contacts API systemXHR PRIVILEGED APIS
  • 63. var deviceStorage = navigator.getDeviceStorage("videos");
  • 64. // "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]);
  • 65. 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; } };
  • 67. var contact = new mozContact(); contact.init({name: "Tom"}); var request = navigator.mozContacts.save(contact); request.onsuccess = function() { console.log("Success"); }; request.onerror = function() { console.log("Error") };
  • 68. WebTelephony WebBluetooth WebSMS Permissions API Idle API Network Stats API Settings API Camera API Power Management API Time/Clock API Mobile Connection API Attention screen WiFi Information API Voicemail CERTIFIED APIS
  • 70. // Telephony object var tel = navigator.mozTelephony; // Check if the phone is muted (read/write property) console.log(tel.muted); // Check if the speaker is enabled (read/write property) console.log(tel.speakerEnabled);
  • 71. // Place a call var cal = tel.dial(ā€œ123456789ā€);
  • 72. // Receiving a call tel.onincoming = function (event) { var incomingCall = event.call; // Get the number of the incoming call console.log(incomingCall.number); // Answer the call incomingCall.answer(); }; // Disconnect a call call.hangUp(); // Iterating over calls, and taking action depending on their changed status tel.oncallschanged = function (event) { tel.calls.forEach(function (call) { // Log the state of each call console.log(call.state); }); };
  • 74. // SMS object var sms = navigator.mozSMS; // Send a message sms.send("123456789", "Hello world!");
  • 75. // Recieve a message sms.onreceived = function (event) { // Read message console.log(event.message); };
  • 77.
  • 78. { "activities": { "share": { "filters": { "type": ["image/png", "image/gif"] } "href": "sharing.html", "disposition": "window" } } }
  • 79. 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!"); };
  • 80. var register = navigator.mozRegisterActivityHandler({ name: "view", disposition: "inline", filters: { type: "image/png" } }); register.onerror = function () { console.log("Failed to register activity"); }
  • 81. 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 });
  • 82.
  • 84.
  • 85. Resource lock API Spellcheck API UDP Datagram Socket API LogAPI Peer to Peer API Keyboard/IME API WebNFC WebRTC WebUSB FileHandle API HTTP-cache API Sync API Calendar API
  • 86. Web Apps from Mozilla
  • 87.
  • 88. Dialer Alarm Clock Contacts Camera Settings Notes SMS First Run Experience Web browser Notiļ¬cations Gallery Home Screen Video Player Mozilla Marketplace Music Player System Updater E-mail (POP, IMAP) Localization Support Calendar
  • 89.
  • 93. FIREFOX OS BOILERPLATE APP https://github.com/robnyman/Firefox-OS-Boilerplate-App
  • 95.
  • 96.
  • 97. 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 }
  • 98. 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(); }
  • 100.
  • 101. https://lists.mozilla.org/listinfo/dev-webapps irc://irc.mozilla.org/ #openwebapps
  • 103.
  • 104.
  • 105.