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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview videos #7

Open
pepegar opened this issue Jul 23, 2013 · 10 comments
Open

Preview videos #7

pepegar opened this issue Jul 23, 2013 · 10 comments
Assignees
Milestone

Comments

@pepegar
Copy link
Contributor

pepegar commented Jul 23, 2013

Give to the user the option to preview videos, for example popping up a lightbox with the video.

@ghost ghost assigned pepegar Jul 23, 2013
@johnbillion
Copy link
Contributor

@simonwheatley pointed out that we could do this in a modal window that calls the oembed endpoint for the item. That way we could add support to the core plugin for previewing for any service that supports oembed. Thoughts?

@paulgibbs
Copy link
Contributor

We'd end up with a modal-in-a-modal, which makes me hesitate. I think we'd need to do some mockups/PSDs exploring this possibility and any other ideas we come up with.

@simonwheatley
Copy link
Contributor

First off, I think allowing a preview before embedding is definitely worth achieving.

Perhaps the ability to “expand” one result at a time, sliding it open to give more height, and show the video playing in the midst of the other results? Not sure how this would work with the grid layout of the YT results.

@pepegar
Copy link
Contributor Author

pepegar commented Aug 17, 2013

@simonwheatley @paulgibbs Perhaps it would be cool to trigger a countdown on the hover state of the videos and, when some time passes (0.5 - 1 secs maybe) replace the image by the embed of YouTube... But I don't know if there is possible to embed a video and play it without the interaction of the user.

@simonwheatley
Copy link
Contributor

Auto play is not possible on YT without some text manipulation of the returned HTML (though that is fairly straightforward). Would the thumbs be big enough to see which video it was?

@simonwheatley
Copy link
Contributor

Here's the auto play code, in case it's handy:

$html = wp_oembed_get('http://www.youtube.com/watch?v=oqMl5CRoFdk&autoplay=1#t=0m05s');
// Auto play video :D
$html = preg_replace( '/src="([^\"]+)"/i', 'src="${1}&loop=1&autoplay=1"', $html );
echo $html;

@pepegar
Copy link
Contributor Author

pepegar commented Aug 20, 2013

Actually, I am trying it and it's possible to embed an autoplayable video just by appending "?autoplay=1" to the src attribute of the iframe.

Hope to have at least a draft by the end of today.

@pepegar
Copy link
Contributor Author

pepegar commented Aug 21, 2013

I have done some progress in this. Actually I've commited fa38e63, which doesn't instantly replaces the image by the video. Instead, it waits a second and then replaces it.

Any thoughts about it?

@mjangda
Copy link
Member

mjangda commented Aug 26, 2013

Might be better to use some sort of click-to-preview (instead of on-hover)?

@pepegar
Copy link
Contributor Author

pepegar commented Aug 27, 2013

Yes, It think it's better to use a click instead a hover @mjangda.

I've implemented it in e44e5cb

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

No branches or pull requests

5 participants