Pergunta

Existe alguma maneira de transmitir arquivos de vídeo e de reprodução do servidor?

O BlackBerry fornecer qualquer leitor de vídeo onde eu posso jogar o vídeo streaming?

Foi útil?

Solução

Sim, pode. Há duas maneiras de transmitir vídeo em bb dispositivo:

  • usando javax.microedition.media.Player da JSR-135
  • usando o padrão de mídia Aplicação

Veja Como - vídeo jogar dentro de aplicação de um smartphone BlackBerry

Você pode testá-lo ao longo do navegador BlackBerry na http://m.youtube.com
Como assistir vídeos YouTube no BlackBerry Bold 9000

Você terá que usar o protocolo WAP ou Wi-Fi para RTSP:
aplicativo Media irá mudar para WAP para streaming media

tipos de mídia suportados no smartphone BlackBerry

Outras dicas

Eu estou usando este código para abrir o leitor (tanto para remoto e vídeos locais):

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()));
    }
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top