Android Question How to Play online video with exoplayer and embed code

M.Amini

Member
Hello, I want to display a video from a video sharing site in my application. There are three options for embed code in the video sharing site and I don't know how to use any of them. These three options for embed code are as follows:
1- Script Code :
B4X:
<div id="77169880327"><script type="text/JavaScript" src="https://www.aparat.com/embed/8Jdh5?data[rnddiv]=77169880327&data[responsive]=yes"></script></div>
2- I Frame Code :
B4X:
<style>.h_iframe-aparat_embed_frame{position:relative;}.h_iframe-aparat_embed_frame .ratio{display:block;width:100%;height:auto;}.h_iframe-aparat_embed_frame iframe{position:absolute;top:0;left:0;width:100%;height:100%;}</style><div class="h_iframe-aparat_embed_frame"><span style="display: block;padding-top: 57%"></span><iframe src="https://www.aparat.com/video/video/embed/videohash/8Jdh5/vt/frame"  allowFullScreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe></div>
3- AMP Code :
B4X:
<style>.h_iframe-aparat_embed_frame{position:relative;}.h_iframe-aparat_embed_frame .ratio{display:block;width:100%;height:auto;}.h_iframe-aparat_embed_frame iframe{position:absolute;top:0;left:0;width:100%;height:100%;}</style><div class="h_iframe-aparat_embed_frame"><span style="display: block;padding-top: 57%"></span><iframe src="https://www.aparat.com/video/video/embed/videohash/8Jdh5/vt/frame"  allowFullScreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe></div>
 

M.Amini

Member
The AMP code above was entered incorrectly, this is the correct code :
B4X:
<amp-iframe width="640" height="360" sandbox="allow-scripts allow-same-origin" layout="responsive" frameborder="0" src="https://www.aparat.com/video/video/embed/videohash/28qsx/vt/frame?isamp"></amp-iframe>
I tried this uri : https://www.aparat.com/video/video/embed/videohash/8Jdh5/vt/frame?isamp
But this does not work either
 
Last edited:
Upvote 0
Top