Giter Club home page Giter Club logo

afterglow's Introduction

DEPRECATED

Sadly, the development of afterglow has been pretty stale for some time now. There are currently no plans for further developement regarding this project, so it has to be considered deprecated.

We strongly recommend using Plyr instead. If you need a lightbox player, consider GLightbox which integrates with Plyr.


GitHub version Build status Coverage Status

afterglow

afterglow is a tool to create fully responsive and totally awesome video players from HTML5 video elements with as little effort as possible.

Learn more about the project on the project website: http://afterglowplayer.com.

Documentation

Documentation is still available here: docs.afterglowplayer.com.

Credits

afterglow relies on scripts provided by many great people.

Our resolution switching component is based on videojs-resolutions by vidcaster published under the Apache License 2.0.

Thanks for your great work, guys!

Thank you!

browserstack

We want to thank the people at browserstack who provide us with a free account for browser testing.

The afterglow documentation would not be that cool without readme.io, who also sponsor the project with a free account.

jsDelivr

Finally, a big thank you to the team behind jsDelivr for hosting afterglow reliably.

Copyright and License

Copyright moay under the MIT license.

afterglow's People

Contributors

moay avatar pronego-mls avatar simonhdickson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

afterglow's Issues

Not working with multiple Youtube video

I can't launch more than one Youtube video with afterglow class :

<video id="video1" class="afterglow" width="1920" height="1080" data-youtube-id="HgbHx4CY300"></video>
<video id="video2" class="afterglow" width="1920" height="1080" data-youtube-id="CaksNlNniis"></video>

fiddle : https://jsfiddle.net/bmartel/whf01e58/

Or is there another way ?

Thanks for your help

function deprecated

my console output this message.

VIDEOJS: WARN: Access to videojs.players is deprecated; use videojs.getPlayers instead

maybe would better update the core.

Thanks. Excellent player

Lightbox mode does not work with youtube videos

Player setup:

<a class="afterglow" href="#myvideo">Launch lightbox</a>
<video id="myvideo" width="960" height="540">
    <source data-youtube-id="{youtube-id}" data-overscale="false" />
</video>

Expected result: Should play youtube video in Lightbox mode
Actual result: Video does not load
Browser: Safari 11.0.1

Bower

Can you please add support for Bower?

404 errors for vjs webfonts on playback

Bug report from Kirill Ivenkov (thank you!)

once I start up the video playback (I'm starting the playback by clicking a link with href="#<video_id>") two font 404s pop up in the console, perhaps some of the font files mentioned in @font-face are missing?

GET http://my domain/path to static file dir/css/fonts/vjs.woff - 404
GET http://my domain/path to static file dir/css/fonts/vjs.ttf - 404

I'm using CDN-hosted Afterglow. Not a big issue though.

Could not confirm those yet in Chrome.

Minified File Size

This is a beautiful little video player, and the upcoming features in the roadmap look truly promising.

There is just one issue that makes me reluctant to use it: The file size of 369kB of the already minified JS file for the player. I have looked at many other open source player scripts with similar features, but none of them are anywhere near that file size, so I'm just wondering if there is anything that can be done about it.

Presumably, with any additional features like the ones listed in the roadmap, the file size will be increasing even more, which will make this otherwise really great player a non-option for many users, I think.

Network request to youtube.com/iframe_api regardless of video type

I have a self-hosted v1.0 player instance with a single mp4 video source that is served from another domain. There is no 'data-youtube-id' defined, but when the player loads it still makes a call to https://www.youtube.com/iframe_api.

This call will start failing when I enable CSP headers for the site, so maybe it won't be an issue, but is that the expected behavior - that it pulls JavaScript from YouTube on every video load regardless of the source?
It looks like this call originates with the video.js YouTube plugin. Should I instead open an issue there?

Weird behaviour when loading of https://fonts.googleapis.com is prevented

Hi,

This behavior is not easy to reproduce, but let me try to explain what I believe is the problem.

We can use Content Security Policy to prevent resources from being loaded from non-approved sites. The quick reference guide reads

The new Content-Security-Policy HTTP response header helps you reduce XSS risks on modern browsers by declaring what dynamic resources are allowed to load via a HTTP Header.

If you set the default policy to * 'unsafe-inline' 'self' 'unsafe-eval' data ( = basically load anything from anywhere is the default behavior) but restrict the style to 'self' 'unsafe-inline' (= load the style only from the same server, and allow inline style), then everything loads perfectly, except for https://fonts.googleapis.com/css?family=Open+Sans:400,300. This is the expected behavior.

The strange part is that, this will prevent afterglow from working completely. The video loaded from vimeo or youtube won't be displayed, no style will be applied, and what will be served is just the plain video html element.

This behavior is difficult to reproduce. You can see it live at https://micr0lab.org/mu0l_0092/, I tried to reproduce it with the following minimal example:

<!DOCTYPE html>
<?php header("Content-Security-Policy: default-src * 'unsafe-inline' 'self' 'unsafe-eval' data;: style-src 'self' 'unsafe-inline'"); ?>
<html>
  <head>
    <title>afterglow player</title>
    <script src="afterglowplayer.js"></script>
  </head>
  <body>
   <video class="afterglow" width="1280" height="720" data-vimeo-id="238388144">
      <source type="video/mp4" src="L_eau_croupie_et_les_fantasmins.mp4" />
    </video>
  </body>
</html>

that you can test live at https://micr0lab.org/t/, but it doesn't exactly show the same weird behavior.

please deliver AIRPLAY - Button

// Detect if AirPlay is available
if (window.WebKitPlaybackTargetAvailabilityEvent) {
    video.addEventListener('webkitplaybacktargetavailabilitychanged', function(event) {
        switch (event.availability) {
            case "available":
                AirPlayButton.show();
                break;
            default:
                AirPlayButton.hide();
        }
        AirPlayButton.on('click', function() {
            video.webkitShowPlaybackTargetPicker();
        });
    });
}

Player scrolls page a second after pausing the video

Scenario:
User pauses video and starts scrolling page.

Within seconds the entire page scroll backs to the top of the video.

User is really annoyed that the whole page scrolled for no reason, back to content they seen already and were trying to ignore.

They leave the website.

Example:
https://youtu.be/NQYjaC0NeFY


Can this issue be fixed please?
It happens on the main afterglow website as well, on all major browsers we tested with.

It's a really nice video player, but this weird bug causing the entire page to jank after pausing the video is disconcerting to the users' experience.

How to disable controls?

How I can disable controls of the player? The controls flag on the video element doesn't work and there is no option for that in the docs.
Thx:) beautyful player

Autostart not working

autoplay="autoplay" is in the video tag in the source code and it works if JS is turned off, it doesn't work if JS is turned on and afterglow is kicking in.

Side note: Sign Up for the community forum is not working (tried in chrome and firefox)

Opening Lightbox stops other videos

In some situation there is no need in such a behaviour. For e.x. there is a background video without any controls and popup video on the same page. After opening lightbox backgroud video stops without posibility to start again.

Fullscreen via double click?

Is it possible to configure afterglow such that double-clicking the video activates fullscreen mode? I haven't found something like this in the documentation, yet.

Even better would be to have a configuration parameter that decides whether double click activates fullscreen or lightbox.

Something like this:

<video class="afterglow" id="myvideo" width="1280" height="720" 
  data-double-click="fullscreen">

  <source type="video/mp4" src="/path/to/myvideo.mp4" />
</video>

Thanks for the awesome project!

Provide an un-compressed version

This is a feature request.

Could you provide a un-compressed version of your tool (i.e., of your js file), to allow easier edition and study of your code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.