youtube-ios-player-helper and chromecast - ios

I'm building a swift3 app that plays Youtube videos using YTH for ios and I want to know if it supports chromecast, if so, how can I enable it?
If not, what should I use?

Not sure whether YTH supports chrome cast or not, but you can always cast content from your app to chromecast.
All you need is the media url which will be used as content id on receiver app.
So basically, you can follow the standard implementation of chromecast integration. And after that when you are building media information, use your youtube video's url as content id and try casting that.

You cannot use https url. It won't be able to play. I have the same issue but I saw that the Chromecast only works with http url. So you have to make a local http url and make that allowable from your device.

Related

Chrome-cast with AVPlayer iOS

I'm playing videos using AVPlayer in my iOS application, and now want to add chrome cast support.
1- As per this link, we can view chrome-cast button when video is playing. Is it the same case with AVPlayer?
2- As per Apple's requirement, my videos are encoded and are in m3u8 format. Can we play that in chrome cast?
Well, you can try to check this Google Cast documentation, it includes API libraries and sample application code to help your applications go big. These APIs are documented in the API references, and the sample code is discussed in the Sender Applications and Receiver Applications overviews.
To answer the question if you can play the m3u8 format in the Chrome Cast, first, you can check this Supported Media for Google Cast to know all the supported media facilities and types in the Google Cast.
Note that Some of these require additional coding or the Media Player Library. See Receiver Applications for more information about developing your receiver application to support these media types.
For more information, check these SO questions:
ChromeCast doesnt play HLS in .m3u8 format
Streaming .m3u8 format using Chromecast

using livestream video in iOS application

I want to use video from some live streaming channel i.e. twitch, youtube in my iOS application without using their plugins. How can i do so?
I'm trying to get url of the video so that i can play it via moviePlayer or something else in my application. At the moment, i'm using OBS for uploading the live-stream on twitch.tv
I've found the following link, but again i'm unable to find the url of the video so can't use the solution mentioned How can I use Livestream player in iOS/Android app?
Thanks,
I have solved the issue using webView. For Youtube we've stream id and we put it in url as "https://www.youtube.com/watch?v=videoId".
For ustream i made url as "https://www.ustream.tv/embed/channelId".
If you don't want to use webView then you can use helper libraries for these platforms i.e. YTPlayer, twitch etc.

SoundCloud says sound is streamable but won't play on iOS or OS X

I'm writing an app for iOS 7 only that uses SoundCloud. But the problem here is that sometimes I fetch sounds that have the streamable property set to TRUE, the stream URL but I'm not able to play it. The player simply hangs. This also happens on OS X.
I know that a couple of sounds from SoundCloud are streamable only with Flash. But if you use the mobile version of the site, then all songs are streamable, even those that needed Flash to run on the desktop version.
What I want to know is how can I play those sounds since they are supposed to be streamable?
One of the sounds that shows this happening is this one:
http://api.soundcloud.com/tracks/99350098/stream?client_id=[YOUR CLIENT ID HERE]
Thanks,
Abras
From other posts it seems SoundCloud have changed/are in the process of changing the protocol they use for streaming between http and rtmp. The problem being that rtmp is flash, which obviously won’t work on iOS and possibly on osx (flash is not install by default).
You can check by going to /streams (not /stream)
A check (http://api.soundcloud.com/tracks/99350098/streams?client_id=YOUR_CLIENT_ID) of the track you gave above, this returns a rtmp url.

youtube player in blackberry

I have the url video on youtube and I want to play the video in the youtube default application on the blackberry without invoking the browser to play
enter code here
I've never found a way to do this. The BlackBerry Invoke class does not have a constant defined for the Youtube app, which is what you can use to open other built-in apps.
I know this isn't what you'd prefer to do, but a couple other alternatives are:
open Youtube videos in the Browser, like this:
Browser.getDefaultSession().displayPage("http://www.youtube.com/watch?v=ciB6ExQa5SM");
take a look at the BlackBerry Youtube Client sample, which would allow you to build an embedded Youtube player. A companion blog post can also be found here. Note: the sample probably won't display video in a simulator, as I think you need to have a valid cellular carrier setup (APN settings, etc.) for the network to allow youtube streaming.

Phonegap Video player plugin for iOS [duplicate]

I am using a Phonegap plugin for playing a video in my iOS app. I'm able to play a video with the URL format like http://easyhtml5video.com/images/happyfit2.mp4.
How do I play Youtube videos using the phonegap-videoplayer-plugin?
YouTube Terms of Service: "You agree not to access Content
through any technology or means other than the video playback pages of
the Service itself, the Embeddable Player, or other explicitly
authorized means YouTube may designate."
There are some methods that will give you direct link to youtube videos. Use "gdata" option to find all possible video formats.
Then parse the result to get desired link. Hope this might be useful
But everywhere I found the code to be edited in .m and .h files. None have explained how to use it.
That's because you can only directly use MPMoviePlayerController from native apps (written in Objective-C). For any other technology you'll have to have an intermediary layer in between.
From googling, I found this plugin for PhoneGap that claims to integrate with MPMoviePlayerController. I've no idea if it's any good, but it might do as a starting point.
try to give the youtube url in this format.
http://www.youtube.com/embed/jxXukpxNSx4
You will get the desired result. But Autoplay is not enabled, as Apple stopped supporting autoplay to save user's bandwidth

Resources