- When you are ready to play a video, insert the markup into the DOM with
autoplay=auto preload
on the tag. Don’t add the markup early and load() or play() it later. If you have the markup in there when the Vue component compiles, it will trigger multiple video loads - When listening when to show the video (like fade it in), listen for the
timeupdate
event, notcanplaythrough
. This ensures that the video will already be playing when you show it. In Safari, thecanplaythrough
plays too soon and will pause on the first frame for a bit (edited) - When you animate the video in, never have it
display:none
or in Safari it will pause on the first frame. Set theopacity
to 0 and then fade it in when ready, for instance - Make sure webm is before mp4, it helps FF out a lot
I hereby claim:
- I am weotch on github.
- I am weotch (https://keybase.io/weotch) on keybase.
- I have a public key ASBCgb1U160YrEag6TP5xlzUDbEKOP4x29GeJ8qPiZumZwo
To claim this, I am signing this object:
Lets look at how Facades work in Laravel 4 by investigating the flow of one of the facaded classes: URL. As in <?=URL::route('news')?>
.
As you'll see in the summary, this isn't exactly described in the procedural order your app is executed. But I think it serves to explain what's going on.
-
The app config has an
aliases
array. In there is:'URL' => 'Illuminate\Support\Facades\URL'
. If you look up that class, you'll see it just has this:protected static function getFacadeAccessor() { return 'url'; }
and that it inherits fromIlluminate\Support\Facades\Facade
. We'll get back to this later. -
Lets now turn to how the app boots up. The /vendor/laravel/framework/src/Illuminate/Foundation/start.php bootstrap file calls
registerAliasLoader()
on an instance ofIlluminate\Foundation\Application
.
### | |
Generate customized Decoy assets | |
### | |
# Deps | |
ExtractText = require 'extract-text-webpack-plugin' | |
autoprefixer = require 'autoprefixer' | |
webpack = require 'webpack' | |
# Autoprefixer config |
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed and saved. | |
* | |
* Add your own CSS or Less to fully customize Atom. | |
* If you are unfamiliar with Less, you can read more about it here: | |
* http://lesscss.org | |
*/ |
# Add this config | |
$ heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib | |
# Login to Heroku CLI | |
$ heroku run bash | |
# The second argument here is the path to your script | |
~ $ ~/php/bin/php -f ~/www/index.php |
yarn add babel-loader babel-core babel-preset-es2015 --dev |
# Install Bash 4 using homebrew | |
brew install bash | |
# Add the new shell to the list of legit shells | |
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells" | |
# Change the shell for the user | |
chsh -s /usr/local/bin/bash | |
# Restart terminal.app (new window works too) |
Not sure how long this will be good for, but here's an easy path to adding Memached and Redis support to MAMP 2.1.3. It depends on the fact that, right now, the Homebrew PHP project and MAMP are using the same versions of PHP. This assumes you have Homebrew and MAMP 2.1.3 installed. I'll just be describing the process for PHP 5.3.20.
-
Make sure you've tapped homebrew-dupes and homebrew-php with:
brew tap homebrew/dupes
andbrew tap josegonzalez/php
. -
Install memcached and redis for PHP Homebrew:
brew install php53-memcache
andbrew install php53-redis
. -
Go into MAMP and navigate to: File menu > Edit Template > PHP > PHP 5.3.2.0 php.ini.