Привет, незнакомец!

Похоже, вы здесь новенький. Чтобы принять участие, нажмите одну из кнопок ниже!

Name of the video should appear on the top

Скрипт: FYTE /Fast YouTube Embedded/ Player
1234689

Комментарии

  • q1kq1k
    отредактировано July 2016 Firefox

    The second parent has other elements, like captions and such,
    and the modal window box is just empty because it consumes that parent.

    And if we go over to just the video page, there is no info on it, like about, metadata, description, related.

    But if we set eatparent to 1 there is no problems, none that I can see at least.



    Also the min-width, causes problems, since the height is not changed of the main div, we end up with a flat video.
    so this property is not needed.

  • отредактировано July 2016 Chrome

    Okay, http://p.ip.fi/wj_W, now eatparent for this site is a CSS-selector figure, so it doesn't cause problems on the video page and fixes the "flat video" problem.

  • But we still can't eat the figure itself, that figure always has other child elements along with the video, and the div containing the iframe,
    so it's: figure -> figcaption(for captions and such), div(iframe).

    Also the iframe is always contained within a div specially designed for the video.
    So if we set eatparent to 1, and we fix this problem not only in lanoire.wikia, but any other wikia for that matter. (fandom.wikia, reddead.wikia, etc..)

    But then the min-width could cause problems again. So it's best to just remove it.

  • отредактировано July 2016 Chrome

    eatfigure: '.inline-video' should be fine then. http://p.ip.fi/5LC-

  • q1kq1k
    отредактировано July 2016 Firefox

    Yes, it seems fine
    {host: /(^|\.)wikia\.com$/, tag:'iframe', match: '[src*="youtube.com/embed"]', eatparent: '.inline-video'},

    This will affect all wikias, not just lanoire.wikia.

    But min-width has to be removed.

  • отредактировано July 2016 Chrome

    But min-width has to be removed.

    Why? I've added min-height and I don't see any problems.

  • I think you should update the min- width & height as well on resize: exibit 1

    But then the 'companion script' you made will also need to adjust those as well.

  • отредактировано July 2016 Chrome

    I don't see any problems with the exhibit 1 neither before nor after resizing. Please elaborate.

  • q1kq1k
    отредактировано July 2016 Firefox

    Well, min-height and min-width, stay the same, as for height and width can actually go below that value.
    https://s31.postimg.org/sj0ilq5u1/image.png
    And then eveything look ridiculous

  • You've convinced me, now min-* are updated after resizing too http://p.ip.fi/dCZ9

  • q1kq1k
    отредактировано July 2016 Firefox

    Hmm, it's interesting how the problem with the video not appearing in the wikias, solved it self.
    I mean, I removed the site specific eatparent rule, and the video still appeared properly. huh?

  • It means that the general logic is good enough.

  • One other thing, is it possible to make the controls visible always? To ignore controls=0?

  • отредактировано July 2016 Chrome

    Why? I thought you use another script that always shows the controls.

  • If there is controls=0 the iframe will then have no controls.
    In direct mode though, the controls are there, but I don't use direct mode.

  • Ah! My script only adds controls=1 but it should rewrite the iframe url.

  • It works.

    And what are your thoughts on https://www.youtube-nocookie.com/embed/ ?
    That one should increase privacy, but I couldn't find much information...

  • No thoughts until I see it used somewhere.

  • http://www.cnet.com/news/youtubes-new-nocookie-feature-continues-to-serve-cookies/
    TL;DR

    That article is 7 years old though...
    But anyway, I guess this nocookie youtube is not used a lot, so it's not really necessary to support it.

  • q1kq1k
    отредактировано July 2016 Firefox

    We have a problem with GOG

    • The video there is out of place. I tried putting position: initial and I got the video where it is supposed to be. But there is still black area below it, so removing the height & min-height solved the problem.
      -- Another way to solve it is to put position:absolute, and top:0, I believe. But the width is the problem in this case.

    • Another is the image, this could also be a problem with any image of this ratio, basically the image there in this case is wider than 16:9, so I guess if the image is 16:9 or wider it should get width:100% and height:auto, not the other way around. It sometimes happens when the page loads, but always happens on resize.

    • And the video title link, is also misplaced a bit, this is caused because its width is 100% and also has padding which adds to the total width. It can be easily taken care of by adding box-sizing: border-box;. But doesn't seem to work if the main div is absolutely positioned.
      You could always do width: calc(100% - 20px) or something like that.



    And the no controls problem is still not solved in the new version (2.4.5)

  • Argh.

    They use a retarded method of positioning via :before and an empty element. I'll see if I can make a universal workaround, otherwise I'll just remove "[x] safe" option completely and will skip such videos by default, because it's impossible to handle all possible crazy css hacks used by people.

    basically the image there in this case is wider than 16:9,

    And the video title link, is also misplaced a bit, this is caused because its width is 100%

    I don't see any problems. ALWAYS POST A SCREENSHOT!111

  • отредактировано July 2016 Chrome

    Whatever, I've fixed the problems I see, the script is updated.
    And now the storyboard is actually a full-fledged "seekbar preview" like the one on Youtube. IMO it's awesome!

  • Great.

    About the video link, it is misplaced because there is 100% width, and padding too which increases the width.
    So either remove the width or add box-sizing: border-box;, to take care of this.

    As for the picture, the width and height values get swapped when resizing.



    Here: (it shows the picture as it is when the page is first loaded, and the problem with the link title)
    https://s31.postimg.org/ek9x82em3/image.jpg

    Pic#2: (values of the width and height are swapped, and image is out of place.)
    https://s31.postimg.org/pl52d36ux/image.jpg

  • отредактировано July 2016 Chrome

    So either remove the width

    Agreed, done.

    width and height values get swapped when resizing

    Can't reproduce. What "resizing"? The video container on that site has fixed dimensions based on the enclosing .container that is 1060px wide.

  • It doesn't happen always, but it does happen quite often.
    https://vid.me/5X9W

    I guess somewhere in the code the values are being changed

  • Ah, previously I didn't shrink the window that much. I can reproduce it in FF 48, but not in Chrome. FF is running the resize handler several times slower than Chrome, which confuses my script, I guess :-)

  • q1kq1k
    отредактировано July 2016 Firefox

    But is it really necessary to resize the image though?
    Wouldn't it be fine with the initial calculation, and keep the width/height even when resizing.?
    I mean, there aren't exact values. So it should be fine.

Войдите или Зарегистрируйтесь чтобы комментировать.