That is, is there an event that video.js fires when the scrub widget is dragged and (in particular) released? This would presumably be like "paused", but work off the scrub widget?
Related
I would like to control (play, pause, download, toggle full-screen, progress bar) the original controls of html5 <video></video> without making the customize button. I don't want to make custom controls. Or, is it the best answer to create custom controls by own?
The reason is I want to toggle when another video is playing or paused. The video player is paused when it is in the invisible area.
I would like to control in javaScript when click original play/pause button like image
I have a small tutorial in my game, which should tell the player how controlls work. There are not many, but it doesn't hurt to show them anyway.
So my game supports controller and keyboard + mouse. If the player has a controller plugged in, I want to show him the controller controls and if not, I want to show him the keyboard + mouse controls.
Now I have something like this already implemented which checks the MOUSE MODE. It works fine, but can only detect the controller if a button or a joystick was moved or pressed.
Is there anyway to check if a controller is connected?
input gdscript controller joystick control
You can use Input.get_connected_joysticks() and then look inside the array if there is a joystick. Also usefull for local multiplayer.
This event joy_connection_changed will also be usefull in some case.
I am currently building an objective c application in xcode that features a full screen horizontally scrolling collection view with cells that take up about 80% of the screen; similar to that of Instagram, Vine, etc. Initially in these cells are video thumbnails that are loaded from a backend source upon the loading of the view.
Since it would be terribly inefficient to load all of these videos at once, I am trying to find a way to only load one video at a time while the user scrolls through the collection view.
The way I am achieving this right now is by using the scrollViewDidEndDecelerating method to calculate whichever cell is in the center of the screen after scrolling, and then beginning to load the video, as well as the scrollViewDidScroll method to stop loading the video. This implementation is shown below:
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
//calculate which cell is in the center
//load video in respective cell
}
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
//stop loading video
}
As you all can probably see, this generates a lot of ux problems:
The video doesn't start loading until scrolling has stopped
completely
This approach doesn't account for drag gestures to
navigate the Collection View
Once a video has loaded, any drag or
scroll stops loading/playing the video
There are times where no video is loading, between scrolls
I am trying to turn this current approach into a system similar to the Instagram method of loading videos, which is as follows:
A video begins to load as soon as it begins to show up on the screen while the user scrolls
A video stops loading when a different video begins to appear on the screen while the user scrolls.
One video is always being loaded, there is no downtime between loading one video and another
I understand that in order to achieve this functionality, these loading functions will need to be done on a background thread in order to allow for seamless scrolling which I can handle, I just need to know which methods I should be using instead of the ones i'm using now in order to achieve this functionality.
You should make it such that the video uses "lazy loading" to load its contents/thumbnail.
To make it play when cell is at center, use scrollViewDidScroll to detect if the cell is completely showing by method indicated at this answer
I'm currently working on an OSX menubar app that uses a custom status item view and a NSPopover to display content.
I'm trying to get it to dismiss at times that would make sense like when spaces are changed, since the popover doesn't move spaces like a window does, or when mission controller is activated.
Currently, when in mission control, the NSPopover stays on top as shown in this screenshot.
Currently I'm using NSEvent addGlobalMonitorForEventsMatchingMask: with some mouse event masks and that works alright but doesn't cover all needed events.
So, is there a way to detect when major OS events happen like opening mission control, changing spaces etc?
Any help would be greatly appreciated.
You can get notified of space changes by registering for NSWorkspace's NSWorkspaceActiveSpaceDidChangeNotification. There isn't a notification as such for Mission Control, but you might investigate whether NSWorkspaceDidActivateApplicationNotification or other notifications can be used to determine what you need.
HTH
I use Ooyala video player in my project, and I need to have my own video control, so I need a way to hind its built-in video control, I found that the OOOoyalaPlayerViewController has method showControls, but the control appears when you tap the video, so is there a way to explicitly hide the controls? I've tried subclassing OOOoyalaPlayerViewController and overwrite showControls to do nothing but it did not work.
Thanks!
If you are creating custom controls, you probably want to use an OOOoyalaPlayer directly versus going through the OOOoyalaPlayerViewController- all the viewcontroller does is add controls on top of the player.
If you must use an OOOoyalaPlayerViewController, try subclassing OOControlsViewController and overwriting - (void)onTap:(UITapGestureRecognizer *)sender. The source for this is bundled with our SDK.