Permalink
Browse files

Protocol options (4.0.20)

  • Loading branch information...
1 parent 0331429 commit 7c289286ccb3a7977a6d3a8df3f1e33c7db4ece0 Doug Anarino committed Sep 11, 2016
Showing with 4,958 additions and 1,219 deletions.
  1. +29 −13 app/php/include/authutils.php
  2. +12 −4 app/php/include/configutils.php
  3. +1 −0 app/php/include/httputils.php
  4. +4 −4 app/php/include/serviceutils.php
  5. +5 −4 app/php/service/s3.php
  6. +9 −0 app/views/inspector/speed.html
  7. +2 −1 app/views/inspector/video.html
  8. +2 −0 app/views/panels.html
  9. +2 −2 bower.json
  10. +5 −5 bower_components/angular-animate/.bower.json
  11. +40 −49 bower_components/angular-animate/angular-animate.js
  12. +52 −51 bower_components/angular-animate/angular-animate.min.js
  13. +3 −3 bower_components/angular-animate/angular-animate.min.js.map
  14. +2 −2 bower_components/angular-animate/bower.json
  15. +1 −1 bower_components/angular-animate/package.json
  16. +4 −4 bower_components/angular-file-upload/.bower.json
  17. +6 −5 bower_components/angular-file-upload/dist/angular-file-upload.js
  18. +1 −1 bower_components/angular-file-upload/dist/angular-file-upload.js.map
  19. +2 −2 bower_components/angular-file-upload/dist/angular-file-upload.min.js
  20. +1 −1 bower_components/angular-file-upload/dist/angular-file-upload.min.js.map
  21. +1 −1 bower_components/angular-file-upload/package.json
  22. +2 −1 bower_components/angular-file-upload/src/directives/FileSelect.js
  23. +3 −2 bower_components/angular-file-upload/src/services/FileSelect.js
  24. +5 −5 bower_components/angular-resource/.bower.json
  25. +104 −9 bower_components/angular-resource/angular-resource.js
  26. +10 −10 bower_components/angular-resource/angular-resource.min.js
  27. +2 −2 bower_components/angular-resource/angular-resource.min.js.map
  28. +2 −2 bower_components/angular-resource/bower.json
  29. +1 −1 bower_components/angular-resource/package.json
  30. +4 −4 bower_components/angular/.bower.json
  31. +1,167 −422 bower_components/angular/angular.js
  32. +308 −306 bower_components/angular/angular.min.js
  33. BIN bower_components/angular/angular.min.js.gzip
  34. +3 −3 bower_components/angular/angular.min.js.map
  35. +1 −1 bower_components/angular/bower.json
  36. +1 −1 bower_components/angular/package.json
  37. +5 −5 bower_components/bootstrap/.bower.json
  38. +6 −0 bower_components/bootstrap/Gemfile
  39. +43 −0 bower_components/bootstrap/Gemfile.lock
  40. +31 −53 bower_components/bootstrap/Gruntfile.js
  41. +22 −0 bower_components/bootstrap/ISSUE_TEMPLATE.md
  42. +1 −1 bower_components/bootstrap/LICENSE
  43. +9 −6 bower_components/bootstrap/README.md
  44. +1 −1 bower_components/bootstrap/bower.json
  45. +2 −2 bower_components/bootstrap/dist/css/bootstrap-theme.css
  46. +1 −1 bower_components/bootstrap/dist/css/bootstrap-theme.css.map
  47. +2 −2 bower_components/bootstrap/dist/css/bootstrap-theme.min.css
  48. +1 −1 bower_components/bootstrap/dist/css/bootstrap-theme.min.css.map
  49. +2 −5 bower_components/bootstrap/dist/css/bootstrap.css
  50. +1 −1 bower_components/bootstrap/dist/css/bootstrap.css.map
  51. +3 −3 bower_components/bootstrap/dist/css/bootstrap.min.css
  52. +1 −1 bower_components/bootstrap/dist/css/bootstrap.min.css.map
  53. +64 −50 bower_components/bootstrap/dist/js/bootstrap.js
  54. +4 −4 bower_components/bootstrap/dist/js/bootstrap.min.js
  55. +109 −0 bower_components/bootstrap/grunt/change-version.js
  56. +3 −3 bower_components/bootstrap/grunt/configBridge.json
  57. +2,679 −0 bower_components/bootstrap/grunt/npm-shrinkwrap.json
  58. +1 −1 bower_components/bootstrap/grunt/sauce_browsers.yml
  59. +3 −3 bower_components/bootstrap/js/affix.js
  60. +4 −4 bower_components/bootstrap/js/alert.js
  61. +13 −8 bower_components/bootstrap/js/button.js
  62. +3 −3 bower_components/bootstrap/js/carousel.js
  63. +4 −3 bower_components/bootstrap/js/collapse.js
  64. +3 −3 bower_components/bootstrap/js/dropdown.js
  65. +6 −4 bower_components/bootstrap/js/modal.js
  66. +3 −3 bower_components/bootstrap/js/popover.js
  67. +3 −3 bower_components/bootstrap/js/scrollspy.js
  68. +3 −3 bower_components/bootstrap/js/tab.js
  69. +13 −7 bower_components/bootstrap/js/tooltip.js
  70. +2 −2 bower_components/bootstrap/js/transition.js
  71. +2 −2 bower_components/bootstrap/less/bootstrap.less
  72. +1 −1 bower_components/bootstrap/less/button-groups.less
  73. +1 −1 bower_components/bootstrap/less/forms.less
  74. +1 −1 bower_components/bootstrap/less/input-groups.less
  75. +3 −3 bower_components/bootstrap/less/mixins/tab-focus.less
  76. +1 −1 bower_components/bootstrap/less/panels.less
  77. +1 −1 bower_components/bootstrap/less/scaffolding.less
  78. +2 −2 bower_components/bootstrap/less/theme.less
  79. +1 −1 bower_components/bootstrap/less/variables.less
  80. +3 −3 bower_components/bootstrap/nuget/MyGet.ps1
  81. +9 −9 bower_components/bootstrap/nuget/bootstrap.less.nuspec
  82. +10 −10 bower_components/bootstrap/nuget/bootstrap.nuspec
  83. +1 −1 bower_components/bootstrap/package.js
  84. +29 −27 bower_components/bootstrap/package.json
  85. +5 −5 bower_components/moviemasher.js/.bower.json
  86. +1 −1 bower_components/moviemasher.js/bower.json
  87. +4 −16 bower_components/moviemasher.js/dist/moviemasher.js
  88. +1 −1 bower_components/moviemasher.js/package.json
  89. +3 −15 bower_components/moviemasher.js/src/others/player.js
  90. +14 −3 config/aws/moviemasher.ini
  91. +15 −3 config/docker/moviemasher.ini
  92. +1 −2 dist/angular-moviemasher.js
  93. +1 −1 package.json
  94. +0 −1 src/angular-moviemasher.js
@@ -1,18 +1,19 @@
<?php /*
-This file provides hooks for the authentication mechanisms and is included by most
-scripts. It uses PHP's built in HTTP authentication but allows ANY username/password
-combination to be used. The auth_challenge() function is only called from the index page.
-The auth_userid() function is called whenever paths are built to the user's content
-(uploads, rendered videos, XML data files). The auth_data() function is called from
-when callbacks are being generated for inclusion in the job XML for the transcoder.
+This file provides hooks for the authentication mechanisms and is included by
+most scripts. By default, it uses PHP's built in HTTP authentication but allows
+ANY username/password combination to be used. The auth_challenge() function is
+only called from endpoints that require a user id. The auth_userid() function is
+called whenever paths are built to the user's content (uploads, rendered videos,
+XML data files). The auth_data() function is called from when callbacks are
+being generated for inclusion in the job XML for the transcoder.
*/
include_once(dirname(__FILE__) . '/loadutils.php');
load_utils('config');
if (! function_exists('auth_challenge')) {
function auth_challenge($config) {
- $realm = (empty($config['authentication_prompt']) ? 'Any username and password will work for this example!' : $config['authentication_prompt']);
+ $realm = (empty($config['authentication_prompt']) ? 'Any username and password will work for this example!' : $config['authentication_prompt']);
// in this example we use HTTP authentication
// if using sessions, you'll probably want to redirect to login page instead
header('WWW-Authenticate: Basic realm="' . $realm . '"');
@@ -25,14 +26,14 @@ function auth_ok($config = array()) {
$ok = FALSE;
// check for configuration problem
if (! $config) $config = config_get();
- if (! config_error($config)) {
+ if (! config_error($config)) {
// check for aleady signed in
$uid = auth_userid();
$ok = !! $uid;
if ($ok) { // we found a username, check for password
switch($config['authentication']) {
case '': break; // any password is okay, just look for user
- default: {
+ default: {
$ok = FALSE;
if (is_string($config['authentication'])) {
$password = http_get_contents($config['authentication']);
@@ -57,17 +58,32 @@ function auth_userid() {
function auth_ok_callback($config = array()) {
$ok = FALSE;
if (! $config) $config = config_get();
- if (! config_error($config)) $ok = auth_ok($config);
+ if (! config_error($config)) {
+ if ('session' == $config['authentication_callback_mode']){
+ // will generate E_NOTICE if session was already started
+ session_start(['use_only_cookies' => 0, 'read_and_close' => 1]);
+ }
+ $ok = auth_ok($config);
+ }
return $ok;
}
}
if (! function_exists('auth_data')) {
function auth_data($transfer = array(), $config = array()) {
if (! $config) $config = config_get();
if (! config_error($config)) {
- // use HTTP authentication - eg. http://User:Pass@www.example.com/path/
- $transfer['user'] = empty($_SERVER['PHP_AUTH_USER']) ? '' : $_SERVER['PHP_AUTH_USER'];
- $transfer['pass'] = empty($_SERVER['PHP_AUTH_PW']) ? '' : $_SERVER['PHP_AUTH_PW'];
+ switch($config['authentication_callback_mode']){
+ case 'http': {
+ // use HTTP authentication - eg. http://User:Pass@www.example.com/path/
+ $transfer['user'] = empty($_SERVER['PHP_AUTH_USER']) ? '' : $_SERVER['PHP_AUTH_USER'];
+ $transfer['pass'] = empty($_SERVER['PHP_AUTH_PW']) ? '' : $_SERVER['PHP_AUTH_PW'];
+ }
+ case 'session': {
+ // use session based authentication - eg. http://www.example.com/path/?PHPSESSID=abcdefghijklmnop
+ if (empty($transfer['parameters'])) $transfer['parameters'] = [];
+ $transfer['parameters'][session_name()] = session_id();
+ }
+ }
}
return $transfer;
}
@@ -3,12 +3,14 @@
// A convenient place to suppress errors and avoid corrupt json responses
ini_set('display_errors', 0);
+
include_once(dirname(__FILE__) . '/loadutils.php');
load_utils('service','http','log','path');
if (! function_exists('config_defaults')) {
function config_defaults($config = array()) {
$config['authentication'] = (empty($config['authentication']) ? '' : $config['authentication']);
+ $config['authentication_callback_mode'] = (empty($config['authentication_callback_mode']) ? 'http' : $config['authentication_callback_mode']);
$config['aws_access_key_id'] = (empty($config['aws_access_key_id']) ? '' : $config['aws_access_key_id']);
$config['aws_secret_access_key'] = (empty($config['aws_secret_access_key']) ? '' : $config['aws_secret_access_key']);
$config['export_audio_codec_audio'] = (empty($config['export_audio_codec_audio']) ? 'libmp3lame' : $config['export_audio_codec_audio']);
@@ -35,11 +37,13 @@ function config_defaults($config = array()) {
$config['import_image_quality'] = (empty($config['import_image_quality']) ? '1' : $config['import_image_quality']);
$config['import_original_basename'] = (empty($config['import_original_basename']) ? 'original' : $config['import_original_basename']);
$config['import_waveform_backcolor'] = (empty($config['import_waveform_backcolor']) ? 'FFFFFF' : $config['import_waveform_backcolor']);
- $config['import_waveform_basename'] = (empty($config['import_waveform_basename']) ? 'waveform' : $config['import_waveform_basename']);
+ $config['import_waveform_basename'] = (empty($config['import_waveform_basename']) ? 'waveform' : $config['import_waveform_basename']);
$config['import_waveform_dimensions'] = (empty($config['import_waveform_dimensions']) ? '8000x32' : $config['import_waveform_dimensions']);
$config['import_waveform_extension'] = (empty($config['import_waveform_extension']) ? 'png' : $config['import_waveform_extension']);
$config['import_waveform_forecolor'] = (empty($config['import_waveform_forecolor']) ? '000000' : $config['import_waveform_forecolor']);
$config['module_host'] = (empty($config['module_host']) ? $_SERVER['HTTP_HOST'] : http_get_contents($config['module_host']));
+ $config['module_directory'] = (empty($config['module_directory']) ? substr(dirname(dirname(dirname(__FILE__))), strlen(path_add_slash_end($config['web_root_directory']))) : $config['module_directory']);
+ $config['module_protocol'] = (empty($config['module_protocol']) ? 'http' : $config['module_protocol']);
$config['user_media_host'] = (empty($config['user_media_host']) ? $_SERVER['HTTP_HOST'] : http_get_contents($config['user_media_host']));
$config['callback_host'] = (empty($config['callback_host']) ? $_SERVER['HTTP_HOST'] : http_get_contents($config['callback_host']));
$config['log_request'] = (empty($config['log_request']) ? '' : $config['log_request']);
@@ -52,11 +56,12 @@ function config_defaults($config = array()) {
$config['log_file'] = (empty($config['log_file']) ? '' : $config['log_file']);
$config['callback_directory'] = (empty($config['callback_directory']) ? substr(dirname(dirname(__FILE__)), strlen(path_add_slash_end($config['web_root_directory']))) : $config['callback_directory']);
$config['install_directory'] = (empty($config['install_directory']) ? substr(dirname(dirname(dirname(__FILE__))), strlen(path_add_slash_end($config['web_root_directory']))) : $config['install_directory']);
+ $config['callback_protocol'] = (empty($config['callback_protocol']) ? 'http' : $config['callback_protocol']);
$config['cgi_directory'] = (empty($config['cgi_directory']) ? substr(dirname(dirname(__FILE__)), strlen(path_add_slash_end(path_concat($config['web_root_directory'], $config['install_directory'])))) : $config['cgi_directory']);
$config['user_media_directory'] = (isset($config['user_media_directory']) ? $config['user_media_directory'] : path_concat(substr(dirname(dirname(dirname(__FILE__))), strlen(path_add_slash_end(path_concat($config['web_root_directory'], $config['install_directory'])))), 'user'));
$config['user_media_url'] = (isset($config['user_media_url']) ? $config['user_media_url'] : $config['user_media_directory']);
+ $config['user_media_protocol'] = (isset($config['user_media_protocol']) ? 'http' : $config['user_media_protocol']);
$config['user_data_directory'] = (isset($config['user_data_directory']) ? $config['user_data_directory'] : path_concat(substr(dirname(dirname(dirname(__FILE__))), strlen(path_add_slash_end($config['web_root_directory']))), 'user'));
- $config['module_directory'] = (empty($config['module_directory']) ? substr(dirname(dirname(dirname(__FILE__))), strlen(path_add_slash_end($config['web_root_directory']))) : $config['module_directory']);
$config['s3_bucket'] = (empty($config['s3_bucket']) ? '' : $config['s3_bucket']);
$config['s3_region'] = (empty($config['s3_region']) ? '' : $config['s3_region']);
$config['sqs_queue_url'] = (empty($config['sqs_queue_url']) ? '' : $config['sqs_queue_url']);
@@ -87,8 +92,11 @@ function config_error($config) {
}
if (! function_exists('config_get')) {
function config_get() {
- $ini_path = 'moviemasher.ini';
- $config = @parse_ini_file($ini_path);
+
+
+// this constant can be defined before calling this method to easily override
+ if (! defined('MM_INI_FILE')) define('MM_INI_FILE', 'moviemasher.ini');
+ $config = @parse_ini_file(MM_INI_FILE);
if (! $config) $config = array();
else $config = config_defaults($config);
return $config;
@@ -24,6 +24,7 @@ function http_execute_array($ch) {
if (! function_exists('http_get_contents')) {
function http_get_contents($url) {
if (http_is_url($url)) {
+ echo $url;
$result = http_retrieve($url);
if (! $result['error']) $url = $result['result'];
else $url = '';
@@ -255,7 +255,7 @@ function service_export_module_source($config = array()){
function __export_progress_callback($payload, $config){
return auth_data(array(
'host' => $config['callback_host'],
- 'type' => 'http',
+ 'type' => $config['callback_protocol'],
'trigger' => 'progress',
'path' => path_concat($config['callback_directory'], 'export_progress.php'),
'data' => $payload,
@@ -264,7 +264,7 @@ function __export_progress_callback($payload, $config){
function __export_complete_callback($payload, $config){
return auth_data(array(
'host' => $config['callback_host'],
- 'type' => 'http',
+ 'type' => $config['callback_protocol'],
'trigger' => 'complete',
'path' => path_concat($config['callback_directory'], 'export_complete.php'),
'data' => $payload,
@@ -273,7 +273,7 @@ function __export_complete_callback($payload, $config){
function __import_progress_callback($payload, $config){
return auth_data(array(
'host' => $config['callback_host'],
- 'type' => 'http',
+ 'type' => $config['callback_protocol'],
'trigger' => 'progress',
'path' => path_concat($config['callback_directory'], 'import_progress.php'),
'data' => $payload,
@@ -282,7 +282,7 @@ function __import_progress_callback($payload, $config){
function __import_complete_callback($payload, $config){
return auth_data(array(
'host' => $config['callback_host'],
- 'type' => 'http',
+ 'type' => $config['callback_protocol'],
'trigger' => 'complete',
'path' => path_concat($config['callback_directory'], 'import_complete.php'),
'data' => $payload,
@@ -9,14 +9,15 @@ function s3_file_source($input, $config){
return array(
'name' => $config['import_original_basename'],
'extension' => $input['extension'],
- 'type' => 'http',
+ 'type' => $config['user_media_protocol'],
'host' => $config['user_media_host'],
'path' => path_concat(path_concat($config['user_media_url'], $input['uid']), $input['id']),
);
}
function s3_file_import_url($import, $config){
$uid = (empty($import['uid']) ? '' : $import['uid']);
- return path_concat('http://' . $config['user_media_host'], path_concat($config['user_media_url'], $uid));
+
+ return path_concat($config['user_media_protocol'] . '://' . $config['user_media_host'], path_concat($config['user_media_url'], $uid));
}
function s3_file_export_url($import, $config){
return s3_file_import_url($import, $config);
@@ -43,10 +44,10 @@ function s3_file_config_error($config = array()){
}
function s3_file_export_module_source($config){
return array(
+ 'type' => $config['module_protocol'],
'host' => $config['module_host'],
'directory' => $config['module_directory'],
- 'method' => 'get',
- 'type' => 'http'
+ 'method' => 'get'
);
}
function s3_file_destination($output, $config, $prefix = 's3'){
@@ -0,0 +1,9 @@
+<div class='amm-inspector-row'>
+ <input type="range"
+ step="0.1" min="0.1" max="10"
+ ng-change="$amm.player.change('speed')"
+ ng-model="$amm.player.selectedClip.speed"
+ />
+ <label>Speed:</label>
+ {{$amm.player.selectedClip.speed}}
+</div>
@@ -1,5 +1,6 @@
<div ng-include="'views/inspector/label.html'"></div>
-<div ng-include="'views/inspector/trim.html'"></div>
<div ng-include="'views/inspector/gain.html'"></div>
+<!-- <div ng-include="'views/inspector/speed.html'"></div>-->
+<div ng-include="'views/inspector/trim.html'"></div>
<div ng-include="'views/inspector/visual.html'"></div>
@@ -55,7 +55,9 @@
<option value='image'>Images</option>
</optgroup>
<optgroup ng-if="amm_resources.module.search" label="Modules">
+<!--
<option value='transition'>Transitions</option>
+ -->
<option value='effect'>Effects</option>
<option value='theme'>Themes</option>
</optgroup>
View
@@ -4,7 +4,7 @@
"homepage": "http://www.moviemasher.com",
"authors": [ {"name": "Movie Masher", "email": "support@moviemasher.com" }],
"description": "Example deployment of moviemasher.js and moviemasher.rb utilizing AngularJS, Bootstrap and PHP",
- "version": "1.0.15",
+ "version": "1.0.16",
"ignore": [
"**/.*",
"node_modules",
@@ -20,7 +20,7 @@
"bootstrap": "~3.3.6",
"angular-bootstrap": "~1.3.3",
"angular-bootstrap-colorpicker": "~3.0.25",
- "moviemasher.js": "4.0.19"
+ "moviemasher.js": "4.0.20"
},
"devDependencies": {
"grunt": "^0.4.5",
@@ -1,18 +1,18 @@
{
"name": "angular-animate",
- "version": "1.5.6",
+ "version": "1.5.8",
"license": "MIT",
"main": "./angular-animate.js",
"ignore": [],
"dependencies": {
- "angular": "1.5.6"
+ "angular": "1.5.8"
},
"homepage": "https://github.com/angular/bower-angular-animate",
- "_release": "1.5.6",
+ "_release": "1.5.8",
"_resolution": {
"type": "version",
- "tag": "v1.5.6",
- "commit": "99ab9c6c6888231eb79a7f6095c370fda1bf3345"
+ "tag": "v1.5.8",
+ "commit": "688b68844cf95420e1793327f69d0c25589c23d1"
},
"_source": "https://github.com/angular/bower-angular-animate.git",
"_target": "~1.5.5",
Oops, something went wrong.

0 comments on commit 7c28928

Please sign in to comment.