I am developing an iOS app. In that I am loading couple of youtube videos using HTML5 using webview.
I am bit concerned about the fact that apple will reject the apps that are loading some big videos directly without HTTP live streaming.
So, is my approach wrong? Shall I load youtube video directly? Is the youtube providing HTTP livestreaming by itself?
I am curious to know these stuffs.
Thanks.
It's fine to load the YouTube video in HTML WebViews. Many apps do it this way.
The key thing to remember is that you are not allowed to autoplay videos, they have to be user initiated i.e. they have to press the play button.
Edit:
Please check this official page
Related
I am still relatively new to these topics.
I am programming my app in Flutter and I can already use Flutter to play a foreign video from Youtube in the app.
I want to upload in Youtube all my video resources as private to be able to display them in my app.
Is there any documentation on how to do this? What are the costs per request?
Is Youtube even right for such a mobile app?`
I was going to use Firebase cloud storage, but think that can get very expensive once I release the app.
What other options would I have?
This question isn't really suitable for StackOverflow, since it's basically just asking whether you can use YouTube.
That being said, as long as you don't violate the T&C of YouTube and you're fine with storing all your videos on their platform, yes, you can do this. Using YouTube this way is free as of now. But note that there is a difference between "private" and "unlisted".
You can create a profile on youtube, upload as many videos as you want and list them as unlisted, meaning you can only find the video if you have the link, then in your app link the vides to whatever selection method you have. so ex I have a button when clicked launches a specific unlisted youtube url link and plays the video.
It would be the same as if someone was searching your video publicly and playing it, both are free.
We are developing a mobile application (using ionic framework, jquery) and thinking to let our users to share videos from vimeo, youtube etc. in this case we are integrating vimeo video link in iframe. Below are challenges:
Not able to play vimeo videos inline in our application:
on iPhone device when we play vimeo video from our ionic application it opens in a native video player, on the contrary we want to play it inline in our application itself
in case of Youtube video its supported and works well. They have provide Playsinline property to support it.
As per vimeo developers documentation, we have not found any similar video player property to allow inline video rendering
Is there any workaround that you suggest to play vimeo video inline inside application?
Play, seek & load progress events are not supported in mobile application
As per your developers page, play, seek, load progress etc events are not supported in mobile application
Is there any workaround to enable these events on our mobile application
Yes, I know there are limitations that vimeo has declared but can someone provide me if there are any workarounds? Your response to our queries is very much important for us.
Reference:
https://developers.google.com/youtube/player_parameters
https://developer.vimeo.com/player/js-api#event-compatibility
try adding background=1 to your embed code
<iframe id="player1" src="https://player.vimeo.com/video/[video id]?api=1&player_id=player1&background=1" width="630" height="354" frameborder="0"></iframe>
This wil not work in browsers which revert to the flashplayer.
I don't know if you'll have javascript API functionallity.
This will remove all controls aswell. What I've read, it's still in an experimental fase, but hope it works for you.
I want to play a video in my app from youtube link e.g: http://www.youtube.com/watch?v=Uner-3tTY1I.
But i don't want to redirect the user to any web view in the app. Just want to play that video in the video player in the current view of my application.
Is it possible to play the video without redirecting to UIWebView? If possible, how can i do this? Thanks for the help in advance.
The only allowed way seems to be using UIWebview. Doing it other way will violate youtube copyrights.
However there are few open source libraries out there. You can use it at your own risk.
Just use XCDYouTubeVideoPlayerViewController. It uses progressive download + MoviePlayer and AVFoundation frameworks.
To play this video you need to have the link to the video stream that is associated with video you want to play. Unfortunately this isn't so simple to get this link for some movies on YouTube since this link can be encoded for some movies (channel VEVO for example). Read this for more information about encoded links http://www.jwz.org/blog/2013/06/youtube-download-counter-countermeasures-applied/.
Unfortunattely as for now there is no simple way to decode these links. Despite this, you can get the source link for the not encoded films without bigger problems using some calls to the YouTube Api.
In my project i have to use youtube api and play only audio of the video. We must not show the youtube player. Is it possible to play only audio without showing video using youtube api?
Extraction may be the incorrect implied word here. From what I understand, is user133611 wants to have an audio only stream from YouTube. Unfortunately, YouTube directly forbids it. Here is a quote from Kuan Yong from the YouTube API team:
Your API Client will not, and You will not encourage or create
functionality for Your users or other third parties to:
"separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API"
-Kuan Yong, YouTube API Team
Link reference: https://groups.google.com/group/youtube-api-gdata/browse_thread/thread/7fac8e8ff913b6c4?pli=1
I don't think this is really possible only using Youtube API. The Youtube API is not intended to be used for "downloading" videos/audio from them. You should go here, to understand what the Youtube API is really about.
A small abstract:
Unless I am missing something really big, the Youtube API consists of 5 main parts:
Data API
Custom Player
YouTube Direct
Player APIs
Widgets
None of this APIs allow you to for example "download" a video. Also I think (correct me if I'm wrong), that in a youtube video, the audio is actually embedded in the flash video, making the task even less trivial.
To illustrate you, the Data API, allows you to perform and use the youtube video search capabilities, use playlist capabilities and many more of the operations available on the YouTube website.
That have being said, the Youtube API, can be used for example to upload a video from your iPhone to youtube, as this example illustrates.
My Thoughts:
I think that extracting the audio from a youtube video, is actually possible, but involves a whole different process of downloading the video in H264 and then extracting the audio... but it still involves downloading the whole video.
Is the audio only prohibition still valid? Streamus is available as a Chrome Extension. It streams audio only from YT - see website https://streamus.com/
Well, one can simply give the video a width and height of 1px, or better yet do:
.video { text-indent: -9999px; }
And then force the video to play via the API controls. But I wouldn't do it as it is against their TOS and would result in my app being blocked if they find out.
I really confused about your platform. Do you want to do it over iOS platform with writing native code? If yes, you can do it without playing video. But you have to stream both video and music. You can do it with AVAudioPlayer Class, check the reference from
https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/
But yes, you will makes users GSM data overload and it's not fair with letting users about that situation.
Maybe you can force your view over the youtube view? Have you tried that?
If it is against TOS, the op should just drop the idea of implementing his idea.
Just imagine the free music everyone will be streaming out of the promo videos of major videos on youtube!
I'm a newbie to cocoa programing on iPhone.
My client has a website that plays YouTube videos. Once a video is finished playing, it will automatically play the next one. This is done by using the YouTube API and swfobject.
After some research, I was told that Safari on iPhone does not support flash. This make the current swfobject code not working on the iPhone browser.
As workaround, when the user clicked on an embedded player, iPhone will launch the YouTube app.
Is to possible to determine when the YouTube app has finished playing and has returned control back to browser?
You can use UIWebView to play videos from YouTube. You'll have to control those from your application though (start, stop, play next, etc).
Also In iOS you can register custom URI schemes and then redirect the browser (or UIWebView) back to your application. This is how many application do 3-legged OAuth for example (which requires a browser interaction). Which might require having a control over the server.
No, it is not possible to jump out of your App and then come back to it again. Once you leave your App, you are finished.
You'll need to stay in a UIWebView, or come up with another method of playing the YouTube videos from within your App.
-t