Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve a few issues with videos and slides positioning off screen #5

Merged

Conversation

bbethke
Copy link
Contributor

@bbethke bbethke commented May 10, 2016

I noticed a few issues today with some of the newer videos positioning off screen. The slides were doing something similar. I put in a few changes to hopefully resolve the issue and protect against a couple of other issues.

The new video browser is a great idea! 馃憤

@BalestraPatrick
Copy link
Owner

Hey! I noticed some issues too in the slides and videos but I didn't have enough time to fix them. Thanks for taking care of it 馃憤
I see you have some more changes in your branch, did you want to merge those also? 馃槃

@@ -84,12 +84,19 @@ class RealmVideoViewController: UIViewController, UIWebViewDelegate {
}
}

deinit {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! 馃帀 Goes to show what OSes I've been supporting lately 馃槃

@bbethke
Copy link
Contributor Author

bbethke commented May 10, 2016

The changes I have in master on my fork are kind of an experiment right now. I made this feature branch to bundle up the more production-ready changes. I would love your input on what I have going in master, though.

I've gotten as far as being able to dig up the mp4 files out of the html with javascript for most of the videos and play them directly in an AVPlayerViewController. The benefit of this solution is that we get full control over the video player and know when it's being dismissed and everything. The downside is that the best I've been able to come up with for handling the slide show is manually pulling all of the images for the slideshow and making them manually navigable (not yet implemented) which obviously is a pretty big downside since your solution allows for the automatic slideshow progression. If you have a clever solution for keeping the automatic slideshow functionality while also loading the video files directly via the mp4 files, I think that could be a huge win. Otherwise my changes might just remain an experiment 馃槃

@BalestraPatrick
Copy link
Owner

That's great! I am going to merge this changes which are looking good. 馃憤

I took a quick look at your other commits and yeah, they are going in a different direction. I think that for now the hacky solution I am using to render the slides in a background UIWindow is working well.
There could be a way to extract the slides like you propose. I think there is a file specifying at which exact minute a slide should appear somewhere in the source code (it's a JS script or something). If we are able to find that file and easily bind it to the video time, that would be the most elegant solution in my opinion.
The next step will be to implement the dismissal of the RealmVideoViewController with a pinch gesture. The idea is also to add a neat interactive animation to make it a little more fun to use :)

@BalestraPatrick BalestraPatrick merged commit a9aa7e3 into BalestraPatrick:master May 10, 2016
@bbethke
Copy link
Contributor Author

bbethke commented May 10, 2016

I started adding a pinch gesture yesterday and it was having a lot of issues with the webview capturing the pinch. I ended up removing it, but I think it'll be awesome if you get it working. My issues with the gesture is what let me down the new video parsing technique but it may not be worth it.

@BalestraPatrick
Copy link
Owner

Have you tried turning off the zoom feature on the UIWebView to make the gesture work? I think the UI is pretty nice like it is right now, so it would be a waste of space to add a button somewhere to go back.

@bbethke
Copy link
Contributor Author

bbethke commented May 10, 2016

Yea, it appears to be off already in the storyboard and is never manually enabled in code that I can see. I'm guessing the gesture recognizer is still there on their end, but they just check if scalesPageToFit is set in their selector? It's possible we could do some trickery with overriding it somehow, but I didn't look into it much further. I got too distracted extracting the mp4s 馃槅 Here's my basic first attempt at it: bbethke@770cce2

I might have some time to take a look at it again later if you don't get around to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants