Streaming RTMP Video Using Adobe Flash Media Server

I am developing an application for Android devices (Android TV Box), which allows

authenticate users to view digital channels via RTMP using Adobe Flash

Media Server Do I need to create a server side application for streaming or can I just host

video? searched alot but no luck, Any help would be appreciated Thanks.

I tried this using a web view like this

webView = (WebView) findViewById(R.id.webview);

    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setAllowFileAccess(true);
    webView.getSettings().setPluginsEnabled(true);
    webView.getSettings().setSupportZoom(true);
    webView.getSettings().setAppCacheEnabled(true);

    refreshButton = 
        (Button) findViewById(R.id.main_bt_refresh);
    refreshButton.setOnClickListener(this);

    refreshFileName();
}

@Override
public void onClick(View v) {
    refreshFileName();
}

private void refreshFileName() {
    EditText etRtmpUrl = 
        (EditText) findViewById(R.id.setup_et_host);
    EditText etFileName = 
        (EditText) findViewById(R.id.setup_et_file);
    rtmpUrl = etRtmpUrl.getText().toString();
    fileName = etFileName.getText().toString();
    if (fileName.endsWith(".flv")) {
        fileName = "flv:" + fileName;
    }

    bodyHtml = htmlCode;
    bodyHtml = bodyHtml.replaceAll("@FILESRC@", 
            "\"file=" + fileName
            + "&streamer=" + rtmpUrl + "\"");
    webView.loadDataWithBaseURL("http://127.0.0.1",
            htmlPre + bodyHtml
            + htmlPost, "text/html", "UTF-8", null);

But without giving an answer ..

+4
source share

Source: https://habr.com/ru/post/1524063/


All Articles