android - How to play dailymotion live stream in one time? -
i'm developing android application , should create live stream shower activity. there problem cannot solve. problem is:
when open activity. screen comes:
when click play button. comes:(problem screen. fourth screen shold come.) have press left-bottom corner of screen(stop button)
... , press same corner again(play button)
after actions live stream comes..
what can solve problem? codes are:
protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_zindi); getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen); final string rsp = convertstreamtostring(this.getresources().openrawresource(r.raw.ceribin2)); wv = (webview) findviewbyid(r.id.webview2); wv.getsettings().setjavascriptenabled(true); wv.loaddatawithbaseurl("http://zaroktv.com.tr/", rsp, null, "text/html; charset=utf-8", null); } private static string convertstreamtostring(inputstream is) { bufferedreader reader = new bufferedreader(new inputstreamreader(is)); stringbuilder sb = new stringbuilder(); string line = null; try { int = 0; while ((line = reader.readline()) != null) { log.d("line" + (++i), line); sb.append(line + "\n"); } } catch (ioexception e) { e.printstacktrace(); } { try { is.close(); } catch (ioexception e) { e.printstacktrace(); } } return sb.tostring(); }
ceribin2.html file:
<!doctype html> <head> <title>zaroktv</title> </head> <body > <div class='embed-container'><iframe frameborder="0" src="http://www.dailymotion.com/embed/video/x327os6" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;" allowfullscreen></iframe></div> </body>
Comments
Post a Comment