0

Hi guys i am working on an app that fetches youtube video ids from my server & play those videos using YTPlayerView framework.

Now, i want to stream those videos using GoogleCast. Some where i saw that google cast not works on UIWebView. Basically YTPlayerView is also built on top of UIWebView.

My question is, is it possible to stream embed videos using Google cast SDK from YTPlayerView in iOS app ?

Here is the code how am loading video using YTPlayerView :

var params = ["controls":2, "playsinline":0, "autohide":1, "origin":"http://www.youtube.com","autoPlay":1, "showinfo":0, "modestbranding":0, "rel":0]
self.videoPlayerView.loadWithVideoId(movieId, playerVars: params)
cyberlobe
  • 1,783
  • 1
  • 18
  • 30
Ravi
  • 2,441
  • 1
  • 11
  • 30

1 Answers1

0

I think you might want to checkout the YouTube Helper Library for iOS.

The youtube-ios-player-helper is an open source library that helps you embed a YouTube iframe player into an iOS application. The library creates a UIWebView and a bridge between your application’s Objective-C code and the YouTube player’s JavaScript code, thereby allowing the iOS application to control the YouTube player. This article describes the steps to install the library and get started using it from your iOS application.

You're going to download the iOS youtube-helper library from this Github repo.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56