2

からhttps://developers.facebook.com/docs/plugins/embedded-video-player/apiは、我々はremoveListener()subscribe()によって返されたトークンで利用できないようですプレイヤーイベントfacebook埋め込みビデオapiはまだremoveListener()をサポートしていますか? Facebookのドキュメントによると

var handleDesktopEvents = function (msg) { 
     if (msg.type === 'video') { 
      var player = msg.instance; 
      var playHandler = player.subscribe('startedPlaying', function() { 
       // Video started playing ... 
       player.unmute(); 
       console.log('detected video playing'); 
       ga_virtual_pagehit(msg.id); 
       console.log('sent event to GA'); 
       playHandler.removeListener('startedPlaying'); 
       // playHandler.release(); 
      }); 
      console.log('detected video ready'); 
      player.play(); 
      FB.Event.unsubscribe('xfbml.ready', handleDesktopEvents, handleDesktopEx); 
     } 
    }; 
    var handleDesktopEx = function() { 
     // Handle pause() and exceptions 
     console.log('detected pause'); 
    }; 

    FB.Event.subscribe('xfbml.ready', handleDesktopEvents, handleDesktopEx); 

に加入します。デバッガを使用すると、トークンに利用可能なメソッドrelease()があることがわかります。それを使うべきでしょうか?それは今公式ですか?

何か間違っていますか?

+0

また、この問題があり、解決策を探しています。 –

答えて

1

FBが何かをもう一度変更しない限り、release()メソッドがありました。それはremoveListen()が何をしているべきかを行います。

関連する問題