I am having problem with HTML5 Audio tag in Samsung devices, so I need to debug the instance of stageWebViewBridge in Samsung S4. All other devices I tested my app on, have no problem. Main problem I encountered is, I am not being able to inspect the WebView with Chrome inspect [chrome://inspect/].
Although my device is detected and I can even inspect from Chrome for Android, I am not able to see my air app or its stageWebViewBridge instance listed anywhere.
I have managed to find some online resources which say, some of the developers are being able to inspect AIR stageWebView instance in android but not able to inspect in iOS, but that is a very different story. Also, I had read a Google documentation about setting
WebView.setWebContentsDebuggingEnabled(true)
from Remote debugging on Android with Chrome
Can anyone of you guide me how I can set above static variable to true in my AIR app so that, I can inspect?
Code of stageWebViewBridge instance:
var fm:String="http://radio.itechnepal.net:8080/starfmktm//;stream.mp3";
FM_Controller.swv = new StageWebViewBridge(10, 10, 500, 200, false);
FM_Controller.swv.loadString('<head></head><body><script>var intid;var pl=new Audio();window.document.body.appendChild(pl);pl.src="'+fm+'";pl.controls=true;var lastTime=0;function checkPlaying() { if((pl.currentTime==0 && !pl.paused) || lastTime!=pl.currentTime){lastTime=pl.currentTime;StageWebViewBridge.call("onStartPlaying",null);}};pl.addEventListener("abort",handleError);pl.addEventListener("error",handleError);pl.addEventListener("emptied",handleError);function handleError(){StageWebViewBridge.call("onErrorOccured",null);};function play(){pl.play();clearInterval(intid);intid=setInterval(checkPlaying,200);};function pause(){pl.pause();clearInterval(intid);};</script></body>');
FM_Controller.swv.addCallback('onStartPlaying', onStartPlaying);
FM_Controller.swv.addCallback('onErrorOccured', handleError);
stage.addChild(FM_Controller.swv);
I would be thankful to the person who can guide me in inspecting my app on android device with Google Chrome or help me solve audio not playing in Samsung device bug.