Android Media Player "Cannot Play Audio During A Call"

77 views
Skip to first unread message

ROWLAND MWALE

unread,
Oct 2, 2015, 5:04:22 AM10/2/15
to EasyRTC
Hello Guyz

So i have successfully compiled my Easyrtc app with Crosswalk + cordova. Installed it to my S4 device and working great ie voice/video and text mssging. Only problem am facing however is that after a call,when i leave my app and try to play media (video/audio) from my media library,the player says: "cannot play during a call"..for some reason my app seem to permanetly attach itself to the playback resources even after closing both the local and remote Streams (afer call).

Is there anything i shld be doing inorder to realise the playback resources after the call..? Any suggestions..??

Eric Davies

unread,
Oct 5, 2015, 10:20:34 AM10/5/15
to EasyRTC
If you app works correctly in a browser, but not in Crosswalk, then you would appear to have a compatibility issue with Crosswalk + cordova.  I would suggest taking it to who-ever maintains crosswalk + cordova.

ROWLAND MWALE

unread,
Oct 7, 2015, 12:25:16 AM10/7/15
to eas...@googlegroups.com
Thnks Eric,
I initially assumed the same thing..(that may be it was a crosswalk +/ cordova issue). So i experimented again with the easyrtc demos running on chrome. Un / fortunately, i was able regenerate this issue (wthout crosswalk and cordova).

I concluded therefore that this has nothing to do wth any oc the frameworks (Xwalk / cordova).

Researching this issue online reveals that this is a common reported issue amongst most RTC app users ie. Viber, Google Hangouts etc. Like my app, users of these apps were only able to play media after killing/stoping the app.

Eric Davies

unread,
Oct 7, 2015, 10:31:01 AM10/7/15
to EasyRTC
Hmm, that is very interesting. 

ROWLAND MWALE

unread,
Oct 8, 2015, 3:47:48 PM10/8/15
to EasyRTC
Finally, I got around it by calling (within the easyrtc.setOnStreamClosed() function); 

    easyrtc.closeLocalStream();

AND
      
   easyrtc.clearMediaStream( document.getElementById('callervoice'));
             
  
ie:

     easyrtc.setOnStreamClosed( function (easyrtcid) {  //detect when remote stream has closed

   console.log("STREAM CLOSED");
   
         easyrtc.clearMediaStream( document.getElementById('callervoice')); // clear and realise the stream from the media element (handler)
         easyrtc.closeLocalStream();  //Close the local stream
   
});
  


Angel Todorov

unread,
Oct 19, 2015, 10:07:42 AM10/19/15
to EasyRTC
Ho Rowland,
I believe I have got similar problem, although I discovered it in my SPA web client - it is described here: https://groups.google.com/forum/#!topic/easyrtc/riIHwRWKheQ
Unfortunately, usage of "closeLocalMediaStream" in mentioned "easyrtc.setOnStreamClosed" doesn't do the trick.


Any suggestions on the topic above would be highly appreciated!

Reply all
Reply to author
Forward
0 new messages