2
AndroidのWebViewにvimeoプレーヤーを表示しています。 私の質問は:JavaScriptInterfaceを使って、「再生」イベントと「一時停止」イベント、さらには「ビデオの進行状況」を追跡する必要があります。AndroidでJavaScriptInterfaceを使用してvimeoプレーヤーイベントを聞く
AndroidのWebViewにvimeoプレーヤーを表示しています。 私の質問は:JavaScriptInterfaceを使って、「再生」イベントと「一時停止」イベント、さらには「ビデオの進行状況」を追跡する必要があります。AndroidでJavaScriptInterfaceを使用してvimeoプレーヤーイベントを聞く
フル実装のhereがあります。 vimeo-networking-java SDKを使用して動画の埋め込みHTMLを取得することもできます。しかし、あなたが知る必要がある部分は次のとおりです。
froogaloop.addEvent('playProgress', function(data) {
if(!showingPlayer && data.percent > 0) {
showingPlayer = true;
jQuery('.froog_container_class').show();
jQuery('.froog_container_class').css('height', '_windowHeight');
jQuery('.froog_container_class').css('width', '_windowWidth');
/* Most tablets I tested aren't quick enough to make this work
but one can still hope */
jQuery('#loading').fadeOut('slow');
}
});