11 Replies - 542 Views - Last Post: 01 May 2020 - 08:25 AM

#1 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

magnific popup video problem

Posted 30 April 2020 - 06:07 AM

Hi, i use magnific video Popup, and it works, the problem is that i close it keeps running in the background, i found something on the web, it's working but not on this.
i don't know JS and try to understand, i don't know how to fix it - i tried.
i would love if anyone could help.

here's the code:
<div class="col-md-3">
                    <div class="video-wrapper">
                          <div class="play">
                              <a href="#popup1" class="open-popup-link"><img src="img/3D/thumbnails/thumb1.jpg" class="img-fluid">
                               <img src="img/play.png" class="play-btn"></a>
                                <div id="popup1" class="mfp-hide">
                                    <div class="box-video">
                                        <video source src="img/3D/videos/birthday1.mp4" type="video/mp4" width="100%" controls preload></video>
                                    </div>
                                </div>
                            </div>
                    </div>
                </div>



.custom-popup-class .mfp-container {
  padding-top: 40px;
  padding-bottom: 40px;
}

.custom-popup-class .mfp-content {
  width: 100%;
  max-width: 750px;
}


#popup1 {
  width: 100%;
  height: 0;
  overflow: hidden;
  /* This is scale ratio */
  padding-top: 56.25%;
}


#popup1 .mfp-close {
  top: -47px;
  color: #FFF;
  text-align: right;
  right: 1px;
  font-size: 60px;    
}



$('.open-popup-link').magnificPopup({
  type:'inline',
  midClick: true,
  mainClass: 'custom-popup-class'
});

$('body').on('hidden.bs.mfp', '.mfp-content', function () {
$('video').trigger('pause');
})


Is This A Good Question/Topic? 0
  • +

Replies To: magnific popup video problem

#2 DarenR   User is offline

  • D.I.C Lover

Reputation: 707
  • View blog
  • Posts: 4,569
  • Joined: 12-January 10

Re: magnific popup video problem

Posted 30 April 2020 - 06:30 AM

nothing in the js code says to close it-- it says to hide it
Was This Post Helpful? 0
  • +
  • -

#3 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

Re: magnific popup video problem

Posted 30 April 2020 - 06:55 AM

so what do i need to write down to make it work?
Was This Post Helpful? 0
  • +
  • -

#4 DarenR   User is offline

  • D.I.C Lover

Reputation: 707
  • View blog
  • Posts: 4,569
  • Joined: 12-January 10

Re: magnific popup video problem

Posted 30 April 2020 - 07:38 AM

you will have to write a close function

something like this

$("#myModal").on('hidden.bs.modal', function (e) {
    $("#myModal iframe").attr("src", $("#myModal iframe").attr("src"));
});


you will have to change the names to fit your needs
Was This Post Helpful? 0
  • +
  • -

#5 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

Re: magnific popup video problem

Posted 30 April 2020 - 08:24 AM

i'm sorry, but you'll have to be a little more specific for me to understand, what do i need to change = according to the code i added above? =
and is it something general that will work on several video files (video1, video2 ...) or is it something specific to just one?
Was This Post Helpful? 0
  • +
  • -

#6 DarenR   User is offline

  • D.I.C Lover

Reputation: 707
  • View blog
  • Posts: 4,569
  • Joined: 12-January 10

Re: magnific popup video problem

Posted 30 April 2020 - 08:30 AM

so all that code you used is not your own? have you even tried to figure out what it does?
Was This Post Helpful? 0
  • +
  • -

#7 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

Re: magnific popup video problem

Posted 30 April 2020 - 08:46 AM

As I said at the beginning, I don't know JS I'm not a programmer, but I'm trying to understand, I saw that this code was working on something else, and I thought I just had to change the name to what I needed and it would work, but in practice it doesn't happen, so now here I am, From those who understand and know, and to be clear I really appreciate the programmers, I know how much work it takes.
And I have only a small request to help me with this little thing.
Was This Post Helpful? 0
  • +
  • -

#8 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

Re: magnific popup video problem

Posted 30 April 2020 - 11:09 PM

look, i come from the graphics, i know some HTML, CSS and that's it, complicated things i don't know - because i wasn't taught, and now i'm trying to learn and understand.
so if there is someone who can help me and really show me how to do it, for me it will be a big help.
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15792
  • View blog
  • Posts: 63,279
  • Joined: 12-June 08

Re: magnific popup video problem

Posted 01 May 2020 - 06:58 AM

To expand on what DarenR was saying - it would be hard to know exactly what code to give you, if that was an option as this isn't really a code writing service, to do what ever it is you want done. The problem is it looks like what ever framework or plugin you are using is moderately complex given function names and what not.

It's largely possible you just need to enable some settings. Maybe check out the documentation for 'close'.

https://dimsemenov.c...umentation.html
Was This Post Helpful? 0
  • +
  • -

#10 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

Re: magnific popup video problem

Posted 01 May 2020 - 07:54 AM

The code i have attached is considered difficult? I mean to someone like me yes, but to someone who knows?
most of the work i did - part of html and css, just js my problem - because it really i don't know, and i want to understand.
can't even do something simple (to the person who understands) that says "you, close" and show me how to do it?
send me to a site that shows something general doesn't mean much to me, i need it to be more specific.
And yes, i thank you for your help, but can you help me more than that?
Was This Post Helpful? 0
  • +
  • -

#11 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15792
  • View blog
  • Posts: 63,279
  • Joined: 12-June 08

Re: magnific popup video problem

Posted 01 May 2020 - 07:59 AM

Quote

The code i have attached is considered difficult? I mean to someone like me yes, but to someone who knows?

I never heard of 'magnificent video', and have no background information on what the class names, functions, etc in your sample do. DarenR took a guess at it.

Quote

most of the work i did - part of html and css, just js my problem - because it really i don't know, and i want to understand.
can't even do something simple (to the person who understands) that says "you, close" and show me how to do it?

Yes, I get it. You made it clear you want someone to just do it for you.


Quote

send me to a site that shows something general doesn't mean much to me, i need it to be more specific.
And yes, i thank you for your help, but can you help me more than that?

Sorry, no. I am only providing clarification on what I believe DarenR was trying to tell you.
Was This Post Helpful? 0
  • +
  • -

#12 HD47   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 24-July 15

Re: magnific popup video problem

Posted 01 May 2020 - 08:25 AM

Quote

Yes, I get it. You made it clear you want someone to just do it for you.


No, my intention is different, ן didn't ask anyone to write me the code from scratch and then hand it to me on a silver tray or other ...
Just to tell me basically where i'm wrong, if this code I've included is true, and it's true, because i know it's working on something else, then I just have to make adjustments - only that i don't know which and where to do them.
And thank you, really thank you for your response, i appreciate it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1