Vimeo video in iPhone app

I was wondering if there is a way to “embed” Vimeo videos in an iPhone app.

For YouTube videos, I use a web view containing the correct embed code for YouTube videos, and iPhone support on my own iPhone supports converting the flash player to a YouTube button.

Is there a similar way to play Vimeo videos from my application?

Can anyone know the correct <video> -src for Vimeo video?

Thank you Thomas

+4
source share
6 answers

It seems that vimeo transcodes all the videos downloaded these days into iphone compatible versions that are used on their website when viewed from iphone or ipad. However, you can name your videos in an HTML5 player on your site by following the simple tricks found here. If you can place the page on your site somewhere you can upload the video to UIWebView, and everything should work. The limitation of Vimeo is that Flash is embedded, but the video information is all for HTML5. Hope this helps!

+3
source

This is the code for embedding vimeo video in UIWebview

 <iframe src='http://player.vimeo.com/video/12345678?title=0&amp;byline=0&amp;portrait=0' width='320' height='480' frameborder='0'></iframe> 

here 12345678 is the identifier of the video.

Unfortunately, my application was rejected to embed HQ vimeos in UIWebview in the application.

+4
source

I'm not sure if this is possible - Vimeo uses flash.

However, according to this

http://news.cnet.com/8301-27076_3-10394769-248.html

Some videos in the Vimeo collection have been converted for playback on mobile devices that do not support flash

0
source

According to the Vimeo forum, at the moment the only way is to link to a mobile URL, for example

 vimeo.com/m/#/id 

say they will add an API to search for mobile video content More information on http://vimeo.com/forums/topic:20132

0
source
 NSString *htmlString = [NSString stringWithFormat:@"<html>" @"<head>" @"<meta name = \"viewport\" content =\"initial-scale = 1.0, user-scalable = no, width = 320\"/></head>" @"<frameset border=\"0\">" @"<frame src=\"http://player.vimeo.com/video/%@?title=0&amp;byline=0&amp;portrait=1&amp;autoplay=1\" width=\"320\" height=\"140\" frameborder=\"0\"></frame>" @"</frameset>" @"</html>", videoID]; 
0
source

This is my way to play Vimeo videos inside the application.

I use iFrame to load Vimeo videos inside my application.

follow these steps, and so will you.

create uiwebview and attach it to the .h file. My is _webView.

Add this method to your .m file.

 -(void)embedVimeo{ NSString *embedHTML = @"<iframe width=\"300\" height=\"250\" src=\"http://www.vimeo.com/embed/rOPI5LDo7mg\" frameborder=\"0\" allowfullscreen></iframe>"; NSString *html = [NSString stringWithFormat:embedHTML]; [_webView loadHTMLString:html baseURL:nil]; [self.view addSubview:_webView]; } 

I am using inline code in a Vimeo video. (Hope you know what it is)

calling this method inside your viewdidload

 [self embedVimeo]; 

Launch the application and you will see the video in your view. This method works great for me, and I think it helps you too.

0
source

Source: https://habr.com/ru/post/1304930/


All Articles