Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Set start and end timing when youtube autoplay on fancybox popup #1115

Closed
faliqaiman opened this issue May 5, 2016 · 16 comments
Closed

Set start and end timing when youtube autoplay on fancybox popup #1115

faliqaiman opened this issue May 5, 2016 · 16 comments

Comments

@faliqaiman
Copy link

I would like to set the youtube video timing when fancybox trigger. But it wont happen and seems like it will start normally even if I set the start and end time on the youtube link. How to solve this issue?

Here's the youtube code when set the start and end time.

https://www.youtube.com/v/chElHV99xak?start=53&end=59

@k-man
Copy link

k-man commented Jan 10, 2017

have you found an answer, I'm also looking for a solution to that problem

@fancyapps
Copy link
Owner

Try using v3 - http://fancyapps.com/fancybox/3/

@k-man
Copy link

k-man commented Jan 10, 2017

Does it apply to websites ?

@fancyapps
Copy link
Owner

What do you mean by that?

@k-man
Copy link

k-man commented Jan 10, 2017

I thought it works only for mobile apps

I figure it out... It worked like a charm

Thanks a million

@k-man
Copy link

k-man commented Jan 10, 2017

any idea how to change the youtube dimensions, i.e. width and height ?

@fancyapps
Copy link
Owner

Good question, I will create a sample and update documentation about that tomorrow (going to sleep right now :))

@k-man
Copy link

k-man commented Jan 10, 2017

Sure, waiting for the answer,
take care :))

@faliqaiman
Copy link
Author

for fancybox v2, I'm using the helpers and add this code;

$(".media-stability").fancybox({
helpers: {
media: {},
},
youtube: {
autoplay: 1,
start: 152,
end: 163,
},
});

@faliqaiman
Copy link
Author

By the way, can you update on fancyapp v3 licensing agreement?
Thanks

@fancyapps
Copy link
Owner

@faliqaiman check samples at Documentation - http://fancyapps.com/fancybox/3/docs/#embedding
And I`m working on licensing info right now.

@k-man
Copy link

k-man commented Jan 11, 2017

@fancyapps you did not answer me regarding how to change the youtube dimensions, i.e. width and height ? on fancybox v3

@fancyapps
Copy link
Owner

fancyapps commented Jan 11, 2017

@k-man I kinda hoped you would check that link (http://fancyapps.com/fancybox/3/docs/#embedding) and find out about sizing :)
Basically, just use CSS to control dimensions (http://codepen.io/fancyapps/pen/PWZrzw?editors=1100):

.fancybox-slide--video .fancybox-content {
    width  : 800px;
    height : 600px;
    max-width  : 80%;
    max-height : 80%;
    margin: 0;
}

@GeorgeRT
Copy link

GeorgeRT commented Mar 1, 2017

So what was the solution? I've tried different permutations starting with the youtube provided URL and using the CodePen from the #embedding documentation (http://codepen.io/fancyapps/pen/mRVNyO?editors=1000):

https://youtu.be/gHE5pun0kqg?t=5m32s
https://www.youtube.com/gHE5pun0kqg?t=5m32s
https://www.youtube.com/watch?v=gHE5pun0kqg&t=5m32s
https://www.youtube.com/watch?v=gHE5pun0kqg&start=5m32s

Thanks.

@fancyapps
Copy link
Owner

fancyapps commented Mar 2, 2017

@GeorgeRT
Copy link

GeorgeRT commented Mar 2, 2017

Got it. Use start & convert to seconds. Thanks!

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

No branches or pull requests

4 participants