ビデオストリーミングブラックベリー
-
11-09-2019 - |
質問
方法はありますストリームの遊びビデオファイルサーバーから?
はブラックベリーを内蔵ビデオプレーヤーができる遊びを配信。
解決
お呼びすることができます。るには二つの方法がありますストリームビデオbb装置
- 使用javax.microedition.メディアプレイヤーからjsr-135
- 標準メディア応用
見 どのように遊びビデオ内のブラックベリースマートフォンアプリ
できる試験でブラックベリーのブラウザ http://m.youtube.com
視聴方法についてはYouTubeの動画BlackBerry Bold9000
を使生産年齢人口はWiFiプロトコルRTSP:
メディアの応用にスイッチを生産年齢人口のためのストリーミングメディア
他のヒント
私は(両方のリモートとローカルビデオ用)内蔵のプレーヤーを開くには、このコードを使用しています:
private void handleVideo(String url) {
try {
Invocation inv = new Invocation();
if (url.startsWith("local")) {
url = url.substring(url.lastIndexOf('/'));
InputStream is = getClass().getResourceAsStream("/res" + url);
if (is == null)
return;
// move resource to device memory so that we get an url which
// can be passed to Invocation
url = "file:///store/home/user/videos" + url;
FileConnection dest = (FileConnection) Connector.open(url);
if (!dest.exists())
dest.create();
dest.setWritable(true);
OutputStream o = dest.openOutputStream();
byte[] buf = new byte[8192];
int length = -1;
while ((length = is.read(buf)) > 0)
o.write(buf, 0, length);
o.close();
is.close();
dest.close();
}
inv.setID(BlackBerryContentHandler.ID_MEDIA_CONTENT_HANDLER);
inv.setArgs(new String[] { BlackBerryContentHandler.MEDIA_ARGUMENT_VIEW_MEDIA });
inv.setURL(url);
Registry reg = Registry.getRegistry(getClass().getName());
reg.invoke(inv);
} catch (Throwable e) {
UiApplication.getUiApplication().invokeAndWait(new RunnableDialog(e.getMessage()));
}
}
所属していません StackOverflow