Domanda

I have written a web app using the 'bleeding edge' HTML5/WebRTC API's (See code below). This works on Chrome v20 (with MediaStream flag enabled) and latest FF Nightly build 17.0a1 (with “media.navigator.enabled” pref created and set to true). I havent yet got it working on Opera.

However, my question is, will this work on future mobile versions of these browers? and If so when?

if(navigator.webkitGetUserMedia){   
   //For WebKit (Chrome/ Safari)
   navigator.webkitGetUserMedia({video: true, audio: false}, function(localMediaStream)      {
          $("#video").attr("src",window.webkitURL.createObjectURL(localMediaStream)); 
    }, function(e) {
      console.log(e);
    });
}else if(navigator.mozGetUserMedia){
  //For Firefox
  navigator.mozGetUserMedia({video: true}, function(localMediaStream) {
  var video = document.querySelector('video');  
  video.src = localMediaStream;
  video.play();
    },  function(e) {
      console.log(e);
    });
}else if(navigator.getUserMedia){
    //For Opera
    navigator.getUserMedia({audio: false, video: true}, function(localMediaStream) {
    $("#video").attr("src", localMediaStream);                                  
    },  function(e) {
      console.log(e);
    });
}
È stato utile?

Soluzione

Currently Opera Mobile 12.0 only support getUserMedia API - however I'm expecting that other mobile clients 'll start supporting it at the beginning of the 2013.

Updated at 3:57 am - Wednesday, 21 May 2014 (UTC)

Now, all major three browsers are supporting WebRTC (getUserMedia + PeerConnection + RTCDataChannel) on android:

  1. Firefox - its a Google App Store link
  2. Chrome - its a Google App Store link
  3. Opera - its a Google App Store link

You can use cross-walk project and compile your HTML into cross-platform apk files and it will work! It supports All WebRTC features i.e. getUserMedia + PeerConnection + RTCDataChannel.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top