wistia in native iOS player?

2.5k views Asked by At

could someone please tell me whether it is possible to embed vistia in the native iOS video player ? We are looking for alternative options to hosting videos on youtube, and have heard some good things about vistia. Currently our app play a youtube url directly within the native video player. Thanks in advance.

2

There are 2 answers

0
Pahnev On BEST ANSWER

Well I guess the native player doesn't want to play with that url.

I would imagine that UIWebView should open that url anyway.

Here is how you would use it:

- (void)loadRequestFromString:(NSString*)urlString
{
    NSURL *url = [NSURL URLWithString:urlString];
    NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
    [self.webView loadRequest:urlRequest];
}

And then when you would load the view that has the UIWebView in it just call that method. In your case

[self loadRequestFromString:@"http://fast.wistia.net/embed/iframe/5gu0g6pvgu"];
2
HixField On

I have have been in contact with wistia and in about a month they will release a native iOS SDK that will allow playing their content via the standard AV Foundation framework. They did not give me any further details (so we have to wait in the release), but most probably MPMoviePlayerViewController support is what they mean.

In the meanwhile they told me to use UIWebview as detailed in the answer from @Pahnev

Edit: here is the sdk:

https://github.com/wistia/WistiaKit

Edit:

Wista now supports native HLS (HTTP Live Streaming) :

Just put .m3u8 behind the wistia hash id and call there embed asset url, this plays natively in the AVPlayer. This looks like this:

https://fast.wistia.net/embed/medias/{hashid}.m3u8

Note however that this requires HLS option to be activated on your wistia account, its possible that you need to contact Wistia support for this!