Youtube video in a UIWebView with small frame - ios

In my app I'm supposed to make a menu where users can play a video from a list. The list is presented in a horizontal UIScrollView and I have a frame of 120x80 (in points, in pixels it's 240:160 on retina). The links for videos are either youtube urls or addresses of .m3u8 files on our server (I put them in a simple html from apple's http live streaming documentation).
My problem is with the youtube urls. These pages opened in UIWebView always have a bar on top that limits the tappable surface to half. Also when I play the video for first time another bar shows up (for like, dislike and things like that), which limits the space that will launch the video on tap to 0.
My goal here is to have the videos represented by images (UIImageViews) with buttons on top of them in shape of the "Play" triangle. When I press that UIButton, the video should show, as normal, inside an MPMovieController.
So I need 1 of 2 things:
Have the UIWebView show just the video of the youtube page, without the bars.
Make the youtube video show inside an MPMovieController after user taps a UIButton.
Any tips on how to do either of these?

Yes you can do like this and you need use set property on UIWebView.look this example
here

Related

why my youtube video not displaying an image?

on this page, the video at the top of the page does not display an image unlike the video located on the side bar.
When play is pressed, there is no playback problem.
But my visitors may not click on the video thinking it doesn't work.
How can I make it appear?
the original video is here
The javascript code is here
The thumbnail sddefault isn't loading for an unknown reason for video VnWbJbtsyv4. However hqdefault seems to be working. So use https://img.youtube.com/vi/VnWbJbtsyv4/hqdefault.jpg instead of https://img.youtube.com/vi/VnWbJbtsyv4/sddefault.jpg.

I want to design a screen which will show different number of videos on same screen based on certain condition

This is an iOS problem.
I want to design a screen which will show a video on full screen. After some time based on some backend condition if another video is available I have to show that by splitting the screen into two vertical halves. After some time if one more video is available I have to again split the screen and show the third video horizontally on the bottom of the screen.
I am new to iOS and I am not able to manage the screen split on runtime based on backend condition. please help me in this regard.
Using AVPlayer it possible to play multiple videos in a view. You can use Apple's AVPlayer.
An AVPlayer is a controller object used to manage the playback and
timing of a media asset. You can use an AVPlayer to play local and
remote file-based media, such as QuickTime movies and MP3 audio files,
as well as audiovisual media served using HTTP Live Streaming.

Overlay, Search functionality in TVML App

We are building a TV application with user login and playing videos with search functionality. So we have designed our home screen with catalog template as in the below picture.
https://i.stack.imgur.com/1BWjl.jpg
Our Pending tasks are
1. Playing Videos in overlay with tag.
We are trying to achieve overlay with videofiles in a shelf. An api call result gives a list of videos which has to play in video player. The first item in the array should play in video player and remaining array items should display as overlay in the shelf. On mouse over, video file in overlay, should play in the overlay itself, with the help of tag, just like thumbnail video play. We tried a lot to play a video in overlay with the tag. But we couldn't do that.
A progress bar to be displayed on the current video which is being
playing.
We expected video play with progress bar and overlay on video player, but we got the output as in the link. https://i.stack.imgur.com/gepIo.jpg.
Progress bar is missing and videos inside the overlay are not playing.
Search functionality
End user can be able to search other users. So we have planned search functionality as a separate link. We have implemented search functionality as a separate template. Its working perfectly, but if i add it in the catalog template as a list item, search template is not loading.
Here is the code for the above application.
https://github.com/TVMLBegnr/TVMLApp
Can any one help me on these tasks. I am not finding TVML experienced people. I can even pay for the tasks.

Controlling/Handling embedded youtube video in long UIWebview content iOS 9

I have UIWebviews that contains different styled texts, images, youtube videos etc. If UIWebview has Youtube video, it has Picture-In-Picture button as default (I have PiP feature in app for my video gallery with AVPictureInPictureController, means PiP enabled in app).
1) How can I opt-out for PiP for those embedded youtube videos
Another case is my UIWebviews are in UICollectionViewCells, that is in horizontal mode, 1 cell per page, paging enabled, I can't pause the youtube video when change page to another, because I have no variable or something that assigned to that player to control player. This case arises in iPad, because in iPhone when you try to play embedded youtube video it goes for full screen, to change another cell you have to press Done(that pauses video) so video handles itself to stop, but in iPad it plays in UIWebview autmatically, doesn't goes for fullscreen
2) How can I get controll on embedded youtube video in my UIWebview
Found solution for #1:
myWebiew.allowsPictureInPictureMediaPlayback = false

is there a way to hide youtube logo from youtube player embedded in iOS?

I have embedded youtube using javascript api in my application and its showing the youtube logo on the bottom right , by clicking that logo it loads the youtube interface in the iframe , all I want is to disable that logo or its functionality , I have tried modestbranding in playervars but its not working
You can't remove it completelly.
you need to contact youtube and probably pay them to remove their logo or replace it with a custom one in any of their videos.
you can hide it using ?modestbranding=1 to your url. That will remove the logo temporany until mouseover on the video.
modestbranding (supported players: AS3, HTML5)
This parameter lets you use a YouTube player that does not show a YouTube logo. Set the parameter value to 1 to prevent the YouTube logo from displaying in the control bar. Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user's mouse pointer hovers over the player.

Resources