Hi I have an html5 video player on my UIWebView, as you may know when I click on the play button the native video player takes control, how can I override the "done" button so I can close the video when its pressed? Thanks! – Claire
I don't think you can, for there's nothing in UIWebView which allows you to do that, UIWebView is actually thought to be pretty closed and straightforward.
UIWebView
After a lot of research I learned that you can't override the done button when using a UIWebView. My workaround was to add a close button to the UIWebView.
Related
I have a Vimeo iframe embed on a mobile site, and am trying to figure out how to detect when the user presses the "Done" button in the native iOS Safari video player.
I know this is possible with the "webkitendfullscreen" event if you are embedding with a video tag directly (as described here):
$('video').bind('webkitendfullscreen', function()
{
console.log('on webkit close');
});
However, the video object is not accessible in the case of a foreign iframe embed.
I have not, so far, been able to find a good way to get this to happen, after quite a lot of keyboard-head-banging. I really hope Vimeo adds a way to do this in the future. The only thing I have found is in their new JS API, there is an event fired when the video has ended, and you can latch on to that and do something if they watch the video all the way to the end. You can also detect when the user pauses the video and do something after a "reasonable" time-frame, depending on what you are trying to do.
My hope was that I would be able to close the corresponding modal window whenever someone closes out of a video, but that was really not a possibility.
you can use the leavepictureinpicture event
myPlayer.on("leavepictureinpicture", () => console.log("leave pip triggered"));
https://github.com/vimeo/player.js/blob/master/README.md#leavepictureinpicture
I am using YTPlayerView iOS Helper Library (0.1.4 and 0.1.5 is having issue in playing video) for playing video within my app,
I figured out that, there is no difference between pause button click and Done button Click, I want to get difference from the SDK itself without adding any Observers or adding a transparent button over Done button.
Is there any way to hide only Next and Previous buttons in AVPlayer while playing a video
You can only either hide them all or show them all via the AVPlayerViewController showsPlaybackControls property, so what I would recommend doing is using an open source or third party library or framework that controls AVPlayer for you.
Such as what's suggested by this related question, which ultimately points to this GitHub project. You can then remove or hide the controls you don't want to be visible.
Alternatively, you could create your own controls that call into, and control, AVPlayer.
=> you can get notification when ply or pause and stop
when you got notification of play at that time you can hide both next and preivios button
I am using AVPlayer to display video in my iOS app. Now I need some nice looking controls for previous, next and the play/pause button. By default AVPlayer doesn't come with any.
I am wondering, are there any open source components out there that I can directly use for such controls? I actually just want the same controls that MPMoviePlayerController uses. But I guess that is not possible, unless I counterfeit them completely.
I could create them myself but I don't want to re-invent the wheel.
Here is a really nice one. BeamApp
https://github.com/BeamApp/MusicPlayerViewController
I want to embed youtube video in my website. My requirement is that the player should have only three options: play, pause and refresh. I want to disable the progressbar slider so that viewer can not move forward or backward.
I used the parameter "controls=0", but it removes the progressbar completely. I just want to disable the dragging functionality.
Anybody knows how to do this?
setting autohide=2 should do it.
https://developers.google.com/youtube/player_parameters#autohide