I'm trying to create an app and have embedded YouTube videos, but I need to remove the on-screen controls from the player (play/back/forward/volume, etc.). Does anyone have any suggestions on how to do this? Is it possible to have my own custom buttons instead (for example, "forward 60 seconds") I've looked at MPMoviePlayerController but research has me under the impression this is not what is called when UIWebView fires up a YouTube video.
I've also looked at the YouTube API but can't seem to find any good tutorials or examples on how to actually use it for iOS development.
Can someone point me in the right direction? I've been trying to figure this out for a couple of days and I just seem to be spinning my wheels.
Any help would be greatly appreciated!
you have multiple options
1. use youtube data api. you can edit the video controls if you use it.
2. you can use 3 rd party frame work youtubekit visit https://github.com/rinov/YoutubeKit
if you want to watch a tutorial got to youtube there is a channel called "codewithchris". here is the link https://www.youtube.com/playlist?list=PLMRqhzcHGw1aLoz4pM_Mg2TewmJcMg9ua
UIWebView is very limited. You cannot put video controls there. Because what UIWebView do is just shows another website as a frame. If there must be some controls, that controls should be in the website. So you cannot add any further controls.
If you want to use control buttons for your videos, instead of youtube, put the video in webpage with control buttons as like. Then put it in UIWebView. Or you can use the media player.
Related
I've been struggling to find a library in which it support my need, and that is to embed a yt video player into a text view. So, what I'm basically trying to do is to create something similar to Reddit in which it have a yt vide inside the thread details.
Currently, i am using NSAttributedString to store the yt thumbnail image and add it into the textView, and in order to play the video, it'll navigate to another view that loads the yt video. It's an okay solution but not the solution that I want
Therefore, are there any solution on how to overcome this problem? Thank you
What i want. :
ps: the image is currently using image attachment aka NSAttributedString, not an UIview with youtube player
I am looking at the Android PlutoTV app and trying to get a similar effect.
Now, just to prove that this video is indeed from YouTube, see the next screenshot:
I would very much appreciate if someone could explain how this overlay effect is obtained notwithstanding youtube's player restrictions.
Kindly help!
Cheers
There are two ways to overlay the Youtube Player:
Using an ActionBar, as described in one of the samples
Using a Dialog or DialogFragment. In this case your view(s) overlaying the player aren't part of the view hierarchy and can't be detected by the youtube player.
EDIT: About 1 vs 2
The first solution is the "official" way to overlay controls/whatever over the Youtube Player. It was difficult for me to use because it simply didn't work after days of trying.
That's why I'm using the second solution, which is technically against the ToS.
But I've just got a small semi-transparent bar at the bottom of the player which disappears after 2 seconds, so I don't think I will have any problem anyway.
I am using YouTube embed player. I want to hide /remove YouTube's default play button so that I can show my own custom play button. Please help me with this.
At least when using the iFrame method (according to this docs entry), there is the controls option, which lets you choose whether to show player controls or not.
I am not sure if it works with HTML5, though.
#jlmcdonald: Please correct me if I'm wrong, but if it's officially supported and documented, why would it violate the terms of service?
I've embedded a video on my site using YouTube's new iFrame embed code, but sadly whenever I test-watch the video on my site, the view count doesn't get increased on YouTube. My video is not on autoplay and it doesn't have 300+ views (it has less than that) so that's not the problem.
I've also tried using the old embed code from YouTube and that works, the view counts increase everytime I test-watch the video from the site.
I'm asking this cause I can't use the old embed code since it's not supported by Apple. So my question is, is it normal that the iFrame code can't count views? What else can I do? Any help at all would be well-appreciated!
Thanks!
Hi having the same issue, please let me know i you find out.
https://stackoverflow.com/questions/26929539/youtube-iframe-does-not-trigger-counter-but-old-method-works
I want to open youtube videos after the user hits an image, that is generated dynamically. The user searches for a videos, and it appears 10 images previews on the scree (that part is done), know I want to detect the tap on that views and open a youtube video that correspond to that preview.
Do you know how I do it?
Thanks a lot!
You can use the tag of image followed by its url.