I have an app for Android and iPhone where we want to create a page with some videos for the user to see (instructions). These videos are all on Vimeo (you can see them here).
I understand that I cannot get the url to the "real" media file - and therefore cannot use the <VideoPlayer>
control. I have tried to set up a simple <Webview>
to show the video in a similar fashion as on the web page I referenced above. This seems to work on Android - but for iPhone it just doesn't appear... This is a snippet of the code:
<View class="formRow">
<WebView html="<html><body><iframe src='http://player.vimeo.com/video/151036965' width='320' height='240' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></body></html>"></WebView>
</View>
If I put a simple link on the same page:
<View class="formRow">
<WebView html="<a href='http://vimeo.com/151036965'>Se video</a>"></WebView>>
</View>
... then I can press that link and then watch the video - so the format for playing should be Ok.
Any insights/suggestions would be appreciated :-)
/John
Ok, this is a little odd... When trying Shawn's suggestion I had left my own attempts in there as well - and the line I had shown in my question actually works now!
<View class="formRow">
<WebView html="<html><body><iframe src='https://player.vimeo.com/video/151036965' width='320' height='240' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></body></html>"></WebView>
</View>
I cannot explain why... However, I did add the last three attributes in my last attempt prior to asking here. I can only guess that somehow they did not take effect when I tried it. It doesn't seem to matter if I reference the video using http
or https
, so I have ended up using https
.
But to sum up - the above markup seems to show the video player correctly for Android as well as iPhone :-)
/John