This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Credit to https://danisadesigner.com/blog/killing-livereload-server/ for the initial command (and a handy bash script) | |
*/ | |
const gulp = require('gulp'); | |
const exec = require('child_process').exec; | |
const livereload = require('gulp-livereload'); | |
// YOUR INCLUDES HERE! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const MIN_SCALE = 0.75; | |
const MAX_SCALE = 2; | |
const SETTLE_RANGE = 0.001; | |
const ADDITIONAL_LIMIT = 0.2; | |
const DOUBLE_TAP_THRESHOLD = 300; | |
const ANIMATION_SPEED = 0.04; | |
const RESET_ANIMATION_SPEED = 0.08; | |
const INITIAL_X = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Direct copy + paste of angular event directives adapted for touch events. | |
'use strict'; | |
var prefix = 'ng'; | |
var tbTouch = angular.module(prefix+'TouchEvents',[]); | |
angular.forEach( | |
'touchstart touchmove touchend'.split(' '), | |
function(eventName) { | |
var directiveName = prefix+eventName[0].toUpperCase()+eventName.substr(1); | |
tbTouch.directive(directiveName, ['$parse', '$rootScope', function($parse, $rootScope) { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
videojs.Player.prototype.unloadTextTracks = function( kind ) { | |
var kinds = ['captions','subtitles','chapters','descriptions','metadata']; | |
var i; | |
var tracks = this.textTracks_ = this.textTracks_ || []; | |
// If no specific type is specified then clear them all | |
if ( !kind ) { |