언어 설정

Menu
Sites
Language
getUserMedia API does not work

I want to use getusermedia to make an application with camera/microphone, but I can not get any data from the MediaStream use Tizen Device.

And the sample demo provided by the SDK named 'selfCamera' does not work either.

 

here is the part of my code:

window.URL = window.URL || window.webkitURL;
      navigator.getUserMedia  = navigator.getUserMedia || navigator.webkitGetUserMedia;
      var recorder;
      var audio = document.querySelector('audio');
      var systemIO = new SystemIO();

      function startRecording() {
        if (navigator.getUserMedia) {
          navigator.getUserMedia({audio: true}, onSuccess, onFail);
        } else {
          console.log('navigator.getUserMedia not present');
        }
      }

      function stopRecording() {

        recorder.stop();
        recorder.exportWAV(function(s) {
          //audio.src = window.URL.createObjectURL(s);
          //it does not work here , which works in chrome.
          var reader = new FileReader();
          reader.onload = function (e) {
            audio.src = e.target.result;
            //I can not get any audio data, which works in chrome too.
            console.log(e.target.result);
          };
          reader.readAsDataURL(s);
        });
      }
      $('#stop').on('click',function(e) {
        stopRecording();
      });
      $('#start').on('click',function(e) {
        startRecording();
      });
Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 댓글
Raghu Kona
Hi, Yes, the application is not functional as expected. Have observed the same behavior on device, though it launches the webcam on emulator. Please follow the below Jira for updates on the issue. https://bugs.tizen.org/jira/browse/TDIST-195 Regards, Raghu Kona