get rid of video button on ios uiwebview - ios

Is there some way to get rid of the giant uiwebview video play button whenever it detects a video. I just want to show a screen of a video without the play button in the way.
Thanks,

If you use the HTML5 video tag then appearance of controls is specified as an attibute i.e.
no controls
<video src="sample_mpeg4.mp4"></video>
all controls
<video src="sample_mpeg4.mp4" controls></video>
just one control
<video src="sample_mpeg4.mp4" controls="Volume"></video>
P.S.
If you want the video to play inline within the UIWebView there are things you need to do within the HTML itself and also within the UIWebView implementation, I can add this info if required.

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.

how to play video with native player instead of web player for a <video> tag?

We have a UIWebView that load html page including video tag. When the user tap the video element, a fullscreen movie player is presented.
As there is some logic in the web page that handle events and need to stop and close the movie player. Is there any API to do so (stop the web movie player and exit fullscreen)?
Any one know how to do this?
Further more, even we want to detect tapping on the video element, then we'll have to provide our own custom player, instead of the system web player. Any way to do it?
Thank you!
This might be helping, if you want to controll the HTML5 video with js: http://www.w3.org/2010/05/video/mediaevents.html
I am not shure if - on a mobile device - javascript will be running while the video is in fullscreen mode.

Keep jquerymobile header on fullscreen video

Im working on jquerymobile app, where I have a few videos from youtube.
To play videos I am using video.js html5 player with youtube plugin.
When video is playing I have some video description showing in the header, which works fine.
The problem Im having is when activating fullscreen mode on the player, video resize fullscreen and header disappears which is not what I want.
I would like to keep header visible even if video is on fullscreen.
I tried to use data-fullscreen attribute, adjust z-index of header but nothing works - header disappears on fullscreen.
Is there any way to keep header always visible on fullscreen?
I created simple demo here http://jsfiddle.net/machumba/ewbpy5s7/2/
<iframe
width="100%"
height="300"
src="http://jsfiddle.net/machumba/ewbpy5s7/2/embedded/"
allowfullscreen="allowfullscreen"
frameborder="0">
</iframe>

How to Restrict the Video Playing With in the UIWebView Only as in the given Frame

My requirement is I do not want to show the video playing in full screen.
For that initially, I choose the MPMoviePlayerController. By using this static videos i.e, which is in our app are playing well but the YouTube videos i.e., contains URL are not playing, instead of that it shows blank screen.
I tried in these ways:- http://pastie.org/8484597 You may think that all the ways are same.. But I tried all the ways as I googled I got these are all the ways.
Later, I moved to UIWebView. Yes, it is absolutely good.. it is playing my videos with No Doubt. Here I am extracting the youtube id and playing. But here, I do not want to play the video in full view. But when I want to play the video we have to click on the UIWebView then instantly it is showing full screen with video playing. But, I want to play with in the web view only.
I followed this link but same problem.. Display video inside the Uiwebview not in device full screen
I tried in these ways.. http://pastie.org/8484621
(I used LBYouTubeExtractor also. it plays good but it is not playing all the videos. For some videos it throws _itemFailedToPlayToEnd error).
Please guide me how to do in UIWebView?.
Wrap the video within a html file and remember to add webkit-playsinline and change the webview attribute webview.allowsInlineMediaPlayback =YES; Then load the html file with the webview. This works for me.
The html file is like
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<video
webkit-playsinline
src="prog_index.m3u8"
height="200" width="200"
type="video/m3u8"
>
</video>
</body>
</html>
Cheers!

How to play a youtube video list in ios natively

I need to play youtube video lists in an iphone app. I did a quick research but still could not find the answer. Most of the answers out there are about playing a single youtube video in iOS by embedding a youtube url in a HTML page and load it in a UIWebview. But it doesn't seem to be the way for playing a list. But I guess it's possible because there are apps that can do that.
Update: I managed to play a list in a UIWebView with iframe method, but it not what i set out to do. I need to play the video not in a full screen mode. Is there anyway to do so?
Thanks
Using UIWebView's internal MPMoviePlayerController, it may be possible to load the videos one by one by storing their URLs in an array and incrementing the array's object position when the finish event is sent internally by the iFrame's javascript. iFrame methods are documented here, and a way to inject a webview with javascript is shown here.
As for non-inline video playing (only fullscreen), set allowsInlineMediaPlayback to NO on the UIWebView.

Resources