How to play facebook embed video in phonegap?

一笑奈何 提交于 2019-12-21 06:22:29

问题


I embedded a facebook video in my phonegap app where I've got two different problems and I'm able to fix just one of them .

1. first problem (fixed) - the facebook video was not being displayed in my app. So I could fix it doing something like this

    .fb-video { width: 100% !important; height:100%!important;  } .fb-video span { width: 100% !important; height:4650px!important; } .fb-video iframe[style] { width: 100% !important; height:100%!important;  }

By the way I'm not sure if it's been doing the second problem, I think it not.

2. second problem - When I click over the video it is not being played. Here some snippet

<body>
  <div id="fb-root"></div>
  <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "http://connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.6";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    <div data-height="250" class="fb-video" data-href="https://www.facebook.com/facebook/videos/10153231379946729/" data-width="500" data-show-text="false"></div>
</body>

So how can I fix the second problem playing the video in phonegap app? Also I'm not sure if it's the right and easiest way to achieve what I'm looking for.

来源:https://stackoverflow.com/questions/37368658/how-to-play-facebook-embed-video-in-phonegap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!