2012-03-16 3 views
1

저는 G.W.T로 개발 된 간단한 메일 시스템을 가지고 있으며 비디오 또는 오디오 파일이 첨부 파일로 제공되는 경우 오디오 및 비디오 파일을 재생하는 기능을 추가하려고합니다.gwt로 미디어 재생하기

나는 bst 플레이어와 HTML 비디오 태그를 사용하여 작업하고 있지만 .avi, .mpeg, .mpg 등의 비디오 포맷을 재생할 수는 없습니다.

그런 종류의 비디오 포맷을 재생하려면 어떻게해야합니까?

반면에 자바 서블릿에서 비디오 파일을 변환 한 다음 플레이어에게 URL을 제공하는 것을 고려하고 있지만 이해가되는지 여부는 알 수 없습니다.

마지막 사항은; VlcPlayerPlugin 또는 다른 비디오 플레이어에서 재생할 수 있도록 비디오 파일을 먼저 변환해야하는 일반 형식 (어쩌면 .flv?)이 있습니까? 다른 팁이 도움이 될 것입니다.

도움 주셔서 감사합니다.

답변

0

이 VlcPlayer의 reply.Because 수있는 기회가 없었어요 이상한 행동과 우분투 및 Windows에 다른 컨트롤 버튼을 보여주는데, 내가 먼저 BstPlayer.I의 FlashPlayerPlugin를 사용하기로 결정 jave을 사용하여 flv로 파일을 변환하면 설명서에 설명되어 있으며 FlashPlayer로 변환 된 비디오를 제공하므로 문제없이 작동합니다. 도움을 주셔서 감사합니다.

0

html5 동영상 태그는 특정 형식 만 재생할 수 있습니다. 여기에서 지원되는 브라우저 형식 목록을 찾을 수 있습니다.

0

나는 또한 BST 플레이어 몇 가지 문제가 있었지만 적어도 다음 코드와 함께 일 :

public YoutubeVideoPopup(String youtubeUrl) 
{ 
    // PopupPanel's constructor takes 'auto-hide' as its boolean parameter. 
    // If this is set, the panel closes itself automatically when the user 
    // clicks outside of it. 
    super(true); 
    this.setAnimationEnabled(true); 

    Widget player = null; 
    try 
    { 
     player = new YouTubePlayer(youtubeUrl, "500", "375"); 
     player.setStyleName("player"); 
    } 
    catch (PluginVersionException e) 
    { 
     // catch plugin version exception and alert user to download plugin first. 
     // An option is to use the utility method in PlayerUtil class. 
     player = PlayerUtil.getMissingPluginNotice(Plugin.Auto, "Missing Plugin", 
      "You have to install a flash plaxer first!", 
      false); 
    } 
    catch (PluginNotFoundException e) 
    { 
     // catch PluginNotFoundException and tell user to download plugin, possibly providing 
     // a link to the plugin download page. 
     player = new HTML("You have to install a flash plaxer first!"); 
    } 
    setWidget(player); 
} 

당신이 볼 수 있듯이, 우리는 긍정적 인 효과를 여기에 유튜브 플레이어를 사용하는 것을 보라 수 YouTube에 배치해야하며 GWT 앱을 다시 배포 할 때마다 서버에 붙여 넣기해서는 안됩니다. 다른 형식으로 플래시를 재생할 수도 있습니다. try 블록에서 올바른 Player 클래스를 사용하기 만하면됩니다. 플래시 예 :

지연 죄송합니다
player = new com.bramosystems.oss.player.core.client.ui.FlashMediaPlayer(GWT.getHostPageBaseURL() + 
      f4vFileName, true, "375", "500"); 
    player.setWidth(500 + "px"); 
    player.setHeight("100%");