GWT 애플리케이션을 개발 중입니다. 내 애플리케이션에 YouTube 동영상을 삽입해야합니다.
BST 플레이어 API를 사용해 보았지만 플레이어에서 비디오를 가져 오는 데 성공하지 못했습니다.
내가 BST Player.jar
을 다운로드하여 내 buildpath에 추가 한 다음 gwtapp.gwt.xml
에서 다음 항아리를 상속 :GWT (BST Player API)에 YouTube 플레이어 삽입하기
simplePanel = new SimplePanel();
add(simplePanel);
simplePanel.setSize("", "");
try {
// create the player, specifing URL of media
player = new ChromelessPlayer("http://www.youtube.com/watch?v=O3CZFfyed3M", "80%", "350px");
CustomPlayerControl cpc = new CustomPlayerControl(player);
FlowPanel fp = new FlowPanel();
fp.add(player);
fp.add(cpc);
simplePanel.setWidget(fp); // add player and custom control to panel.
} catch (PluginVersionException e) {
// required Flash plugin version is not available,
// alert user possibly providing a link to the plugin download page.
simplePanel.setWidget(new HTML(".. some nice message telling the " + "user to download plugin first .."));
} catch(PluginNotFoundException e) {
// required Flash plugin not found, display a friendly notice.
simplePanel.setWidget(PlayerUtil.getMissingPluginNotice(e.getPlugin()));
}
내가 볼 수 있습니다 :
다음**inherits name ='com.bramosystems.oss.player.core.Core'**
**inherits name ='com.bramosystems.oss.player.youtube.YouTube'**
나는 BST 페이지에 주어진 예 시도 YouTube 플레이어가있는 패널이지만 동영상로드 또는 재생을 볼 수 없었습니다. 나는 player.playMedia()
을 시도했으며 도움이되지 않았습니다. 진행하고 비디오를 작동시키는 방법에 대한 아이디어가 있습니까?
멋진데! 감사. – Ashok
이것은 매우 도움이되었지만 비디오를 블랙 라인으로 처리하고 있습니다. 어떤 방법 으로든 제거 할 수 있습니까? –
나는 이것을 단순한 프레임과 함께 사용했다. 괜찮 았는데, 이것도 참조해라. http://stackoverflow.com/questions/14812679/vimeo-embedding-in-gwt –