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

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

Name of the video should appear on the top

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

Комментарии

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

    It's needed when the video container switches orientation from horizontal to vertical in relation to the actual image content - many of 16:9 videos have 4:3 cover-image and vice versa.

    Anyway, I think I've fixed the resize timer problem - http://p.ip.fi/jqct

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

    Well it is slower now. But at least the image doesn't get misplaced.

    I did propose to use a div with background-size:contain, background-position:center center, background-repeat:no-repeat. That would make this a lot faster and simpler.
    Inside the div can be all the rest of the elements(play icon, play directly, options..), and hide this div once the video is loading/started (no need to hide every element separately).
    The only things outside of this div are going to be the title link and the loading image which should also be assigned no-repeat to it.
    Or just, you know, only replace the img with a div...

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

    I think it's the 10th time I tell you that youtube serves many 4:3 thumbnails for 16:9 videos with black bars above and below, 16:9 thumbnails for 4:3 videos with black bars to the left and right. Calculations will be needed anyway to stretch the background. And I don't see any speed difference in FF - it's as slow as always, compared to Chrome's. Not that it matters, this is an edge case as people don't stretch the browser window in small increments continuously, they just maximize/restore or resize in one quick motion.

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

    Alright, I won't bring it up again.

    • Anyway, why every time you add/change the options, they stop working...
      I can't remove the red corners.

    • But, I would keep them on, if they were a little more subtle, and only appear when mouse is near the corner (that is, if the corner is 10px, when mouse is say 20px away from it, it should appear)

    EDIT:
    just noticed the update of the script, so just ignore that first point

  • You only notice them because you're looking at them instead of the video itself. Anyway, if you're willing to suggest a better style I'll use it.

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

    Well, right off the bat I can think of 1 way the corners to appear when close to the edge.

    • This will require wrapping them in another element.
    • A more subtle color for me would be the grey color when it is pinned. (hover can remain yellow as it is now)
    • And a hotkey to quickly get out of the pin mode would be nice. Maybe even for going in pin-mode as well (but i don't know how this will work out though, since many videos on a page and all that)?
  • отредактировано July 2016 Chrome

    Just to be clear: I don't want to restyle them myself :-) I already changed them from an originally inconspicuous styling to the current one. As for the hotkey, what if 4 videos are pinned to different corners? What if that hotkey will conflict with the a hotkey defined by the site (most sites with videos don't use them, but what if)? BTW you can simply click the original placeholder to return the video back.

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

    To be clear: I don't want to restyle them myself :-) As for the hotkey, what if 4 videos are pinned to different corners?

    Yeah, I just thought to try that. And it's awesome, just problem is that we can pin multiple videos to one corner.
    Disabling the corresponding pin button if there is already a video pinned there should do the trick. For unpinned videos that is..



    For the styles, each of those corners should have another div wrapping them.
    Here's how it would look.
    https://jsfiddle.net/xrrn95yf/2/

    I have added background color to that pin-wrapper div so it's easier to see how the hover will work.

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

    Disabling the corresponding pin button if there is already a video pinned there should do the trick

    I thought about that but then decided against it. What if someone decided to open a second video in the same place, watch it, remove it, continue with the first one?

    For the styles, each of those corners should have another div wrapping them.

    I think this is VERY misleading: so I move the mouse cursor close to the edge, a triangle appears - oh so now it indicates what happens if I click, right? Wrong! I have to move the cursor farther. How do I guess that? That's a military-grade a-bomb activation sequence.

    I should have said explicitly that I agreed to a less obtrusive visual styling while keeping the current hover behavior. Initially my own styling was almost invisible because it had a semitransparent white flat fill. I think a 'better' styling would have to have more detail, maybe, or volume/texture.

  • Disabling the corresponding pin button if there is already a video pinned there should do the trick

    I thought about that but then decided against it. What if someone decided to open a second video in the same place, watch it, remove it, continue with the first one?

    But there will be multiple videos then..
    What about replacing the video currently there.?


    For the styles, each of those corners should have another div wrapping them.

    I think this is VERY misleading: so I move the mouse cursor close to the edge, a triangle appears - oh so now it indicates what happens if I click, right? Wrong! I have to move the cursor farther. How do I guess that? That's a military-grade a-bomb activation sequence.

    I should have said explicitly that I agreed to a less obtrusive visual styling while keeping the current hover behavior. Initially my own styling was almost invisible because it had a semitransparent white flat fill. I think a 'better' styling would have to have more detail, maybe, or volume/texture.

    If we increase the pin-wrappers size?

    And what if the opacity of the corner is by default 0.8 or so ?

    https://jsfiddle.net/xrrn95yf/3/

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

    But there will be multiple videos then..

    So what? Let them be, not a problem.

    If we increase the pin-wrappers size?

    Then you will see the pins more often, and - what's worse - they'll flicker a lot more when you move the cursor over the video and near control buttons. I guess I'll just add transition: opacity 3s.

    http://p.ip.fi/rInZ

  • Hmm, I think that could work.

    How about a different speed when removing it?
    transition: opacity 2.5s ease-in, opacity 0.4s ease-out;

    And immediate appearing on hover
    [pin]:hover { opacity: 1 !important; transition: opacity 0s; }

  • Okay, sounds reasonable.

  • q1kq1k
    отредактировано August 2016 Chrome
    This seems interesting.
    http://jsfiddle.net/chriscoyier/t5Kts/

    It could be made so if the mouse is say 100px away opacity would be 0, then the closer the mouse is, the more the opacity is increased.
    The final word is yours.
  • Eeeek, that's hell of a lot of js to execute for every mouse motion, probably as much as my resize handler has.

  • Simpler solution: I've added a transparent pins mode in the options.

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

    Test version: http://p.ip.fi/0aTs
    I've added drag-n-drop of the container to start playing in a pinned position (only if "pinning" option is enabled, of course).
    Additionally, in Chrome drag'n'drop works during playback of directly played videos, not in FF yet.

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

    Is the plan to make this drag-able, so as not to have to carefully click the corners?
    There could be a problem with the video pausing though.

    Youtube+ has a similar feature to this and the same problem was present there.
    But in combination with YT new UI fix, that floater player dragging doesn't work correctly.

  • The idea is to simply flick the container toward a corner and it automatically starts playing there while I can scroll and read other posts/comments.
    I haven't been able to reproduce a problem with the video pausing, though.

  • The idea is to simply flick the container toward a corner and it automatically starts playing there while I can scroll and read other posts/comments.

    I'd like that

    I haven't been able to reproduce a problem with the video pausing, though.

    It was a former issue with youtube+.
    I'm sure you will get it working great right from the start.

  • http://p.ip.fi/X-_j
    Now when a corner is occupied the new videos are stacked above/below.
    No sanity checks are performed currently, so it's possible to overflow the "shelf".

  • Whatever the change was, it broke videos like these.

  • Thanks, fixed, updated.

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

    Hey woxxom,
    In the recent updates I haven't been able to pin a video to a corner with a single click, I have to click twice to pin it. Unpinning requires one click though.

    And why isn't it possible to drag the video while playing? I thought you added that feature, or am I wrong..?

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

    Click bug fixed, please test: http://p.ip.fi/7TmU

    As for dragging, it works for native html5 player in Chrome. Every other combination would require me to put a transparent div over the video. I'm not sure it's a good idea, moreover I would have to avoid covering toolbar (what size is it? it's unpredictable) and any of the editable elements that might pop up inside the iframe like sharing (displays a text input control where dragging means text selection) or any other stuff I don't even know about.

    On the other hand I might add dragging over the full extent of video player with a modifier key pressed, most probably Ctrl, and add an option for that...

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

    Yes, the click bug is gone.

  • Hey, I just noticed that it doesn't process the videos anymore where the iframe appears later (after a click), like on 9gag for example.

  • Gimme a link dammit.

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

    Never mind, it got sorted by itself.
    It's weird...

  • q1kq1k
    отредактировано September 2016 Chrome
    Problems with armorgames,
    The script processes the ad running before starting a game, which makes the game unable to start. I'm using an adblocker and it still gets processed.

    Just simply removing armorgames from being processed isn't the best option. Because there are pages with walkthroughs of games which have YouTube videos. Plus there is the disqus comments below the game.
Войдите или Зарегистрируйтесь чтобы комментировать.