Create a custom desktop YouTube player - api

I want to create an application capable to play YouTube video's audios and also save the downloaded content in a local cache, therefore when the user decides to resume or play the video again, then it doesn't have to download part of video again but only download the remaining part (User can decide what to do with the cache then, and how to organize it).
It is also very convenient for mobiles (it is my main focus) but I'd like to create a desktop one too for experimental purposes.
So, my question itself is, does YouTube provide any API for this? I mean, in order to cache the download content I need that my application download the content and not any embed player (also remember that it is a native application). I have a third-party application in my Android system that plays YouTube videos, so I think it's possible unless that the developers use some sort of hack, again this is what I don't know.
Don't confuse with the web gdata info API and the embed API, this is not what I want, what I want is to handle the video transfer.

As far as I know, there is no official API for that. However, you could use libquvi to look up the URLs of the real video data, or you could have a look at how they do it and reimplement it yourself (see here).

Related

Parsing HLS manifest of live stream in Safari to retrieve time-based metadata

I am using native Safari player implementation to stream video with HLS streaming protocol.
My goal is to get time-based metadata (such as EXT-X-DATERANGE) from a live stream manifest.
As far as I know, it is not possible to retrieve this data because the streaming logic is fully controlled by the Safari player which does not expose this data.
For now, I came to the 2 possible solutions:
Manually download the manifests and parse out the EXT-X-DATERANGE tag. But with this approach, the download timer should be manually managed too. And, of course, the number of requests for the playlists will be increased.
Desktop Safari browser supports MSE. This means it is possible to have full control over manifest retrieving and parsing. There are awesome libraries that already provide this functionality, such as shaka-player or hls.js. It is possible to implement custom response filter for segments(shaka-player) or listen to Hls.Events.FRAG_CHANGED event (hls.js) in order to have access to the playlist. The problem is that Safari in IOS mobile still does not support the MSE. So it is not possible to apply this solution for mobiles.
Are there any other ways to retrieve time-based metadata (such as EXT-X-DATERANGE) using native Safari player implementation?
Thanks a lot in advance!

Streaming movies from my server

I'm playing around to make an app that lets people stream cartoons that I make. It's a very simple app, one ImageView is just loading in a html-homepage in a UIWebView. Witch contain links to .mov files. So if you tap them a movie will start playing. This is because I just want to update the html-file with new cartoons every week.
Is this an "ok" way to do things code:ing-wise? Or am i obligated to us some Objective-c streaming functions?
Is there a specific file-type that i have to use in the movie-files on the server?
Is the HTML static in your app, or does it point to a server? If it's the former, you may be able to get the app approved doing it the way you suggested, depending on the reviewer. If it's the latter, you're unlikely to get it approved by apple.
They tend to frown upon web sites bundled into apps, and will tell you to simply make your website usable with the phone. See section 2.12.
My suggestion is to spend a bit more time and offer iOS users a better - and more immersive - experience than is available via the web. As I'm sure you've found, there are many built-in ways to stream movies and to present them in a manner that surpasses a web-page-like experience.

Upload and share image on Google+

I can't seem to find any documentation or reference on upload and sharing images on Google+.
Is this action current supported in google+?
Their moment sharing seems to accept thumbnail url, but I don't want to keep the image hosted on my site once it is created and shared by visitor.
You have a few different options, but I'm not sure any of them are really what you're looking for.
Google+ doesn't really allow outside apps to upload and share something automatically.
As you've observed, the closest you can get is generating a Moment for them to share. And while there are similarities to Instant Upload, it isn't identical. You could probably use a data url to encode and store the image as part of the moment, but I haven't tested this.
Another alternative is to use the Google Drive API to store the image in their Drive space, permit the image to be read publicly, get a link for it, and use this link as the thumbnail URL. Similarly, you might be able to use the Picasa Web Albums Data API to store the image. Both have good, but different, integration with Google+. The former is more modern, while the latter has more features that are tailored for images.

Streaming music on your website through custom player / application (iTunes)

I was doing some research to find out ways that would allow me to stream music on my website legally. I came across iTunes partner program which allows to stream music on a website through their embedded players. I was wondering is it possible to stream iTunes music through your own custom player? If that is not possible via iTunes, then what other methods are available?
You could do this with a server software like Icecast, there is some good tutorials on setting this up here: http://www.icecast.org/docs.php
Depending on how many browsers you want to support you might want to setup two streams, one in MP3/OGG and a "backup" stream in Flash. Then add some detection as to what the browser supports and present the correct stream (i.e.: Use the HTML5 <audio> tag for playing MP3/OGG to browsers that support this, and use your flash stream for the rest)
their program allowing playback of music in the iTunes Store is likely only for those with the intention to sell music, without providing a commerce business, you'd be breaking their partner program T&C's.

Creating a playlist from my own media library

Hi I'm trying to build my first website where users can play any video from my media library which has 14000 videos in it. If I put a link to the library is there a way that users can access various videos to create their own playlist of say up to 250 videos that will either play sequentially or give them the oportunity to play randomly or maybe the option of rearranging the order that they play in html5 video oh and the media library is on a separate host to the website host. Planning on doing my own hosting.
The question is a bit too vague.
Do you really plan to make all this yourself? If so you are in for a lot of work, serving video requires transcoding, storage, bandwidth, probably CDN.
You might want to think about using sites like youtube or vimeo. or perhaps a service like VidMeUp (http://vidmeup.com)