Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot use jwplayer in an Android app
    primarykey
    data
    text
    <p>I am developing an Android application where I want to play some video dynamically from a URL. So I put a web view in layout and view a html file which contains the jwplayer code but jwplayer is not there, and the web view is showing only "Loading the player....". I can not understand where the issue is.</p> <p>My <a href="http://pastebin.com/874jHFLG" rel="nofollow"> VideoView code </a> here</p> <pre><code>import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Toast; public class VideoActivity extends Activity { /** Called when the activity is first created. */ WebView sampleWeb; String htmlText; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.web); sampleWeb=(WebView)findViewById(R.id.webView); WebSettings webSettings=sampleWeb.getSettings(); sampleWeb.getSettings().setJavaScriptEnabled(true); sampleWeb.getSettings().setBuiltInZoomControls(false); sampleWeb.getSettings().setLoadsImagesAutomatically(true); sampleWeb.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); sampleWeb.getSettings().setAllowFileAccess(true); sampleWeb.getSettings().setPluginsEnabled(true); sampleWeb.setWebViewClient(new WebViewClient()); // sampleWeb.loadUrl("m.google.com"); htmlText="&lt;!DOCTYPE html&gt; "; htmlText+="&lt;html lang='en'&gt;"; htmlText+="&lt;head&gt;&lt;meta charset='utf-8'&gt;"; htmlText+="&lt;/head&gt;"; htmlText+="&lt;body style='margin:0; pading:0;background-color: #ffffff;'&gt;"; htmlText+="&lt;div style='color:black'&gt;Loading the player ...&lt;/div&gt;"; htmlText+="&lt;script type='text/javascript' src='http://shourav.com/android/jwplayer.min.js'&gt;&lt;/script&gt;"; htmlText+="&lt;div id='mediaspace'&gt;This text will be replaced&lt;/div&gt;"; htmlText+="&lt;script type='text/javascript'&gt;"; htmlText+="jwplayer('mediaspace').setup({"; htmlText+="'flashplayer': 'http://developer.longtailvideo.com/svn/trunk/fl5/player.swf',"; htmlText+="'file': 'http://shourav.com/android/android.MP4',"; // htmlText+="'streamer': 'rtmp://b27i9s9t3.rtmphost.com/AndroidMedia',"; htmlText+="'controlbar': 'bottom',"; htmlText+="'width': '200',"; htmlText+="'height': '150'"; htmlText+="});"; htmlText+="&lt;/script&gt;"; htmlText+="&lt;/body&gt;"; sampleWeb.loadData(htmlText, "text/html", "utf-8"); } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload