Showing
6 changed files
with
16 additions
and
1 deletions
... | @@ -125,6 +125,7 @@ class VideoTempController extends AdminController | ... | @@ -125,6 +125,7 @@ class VideoTempController extends AdminController |
125 | $form->radio('draw', '文字效果') | 125 | $form->radio('draw', '文字效果') |
126 | ->options(['fade'=>'淡入淡出', 'fix'=>'固定显示'])->default('fade') | 126 | ->options(['fade'=>'淡入淡出', 'fix'=>'固定显示'])->default('fade') |
127 | ->when('fade',function (Form\NestedForm $form){ | 127 | ->when('fade',function (Form\NestedForm $form){ |
128 | + $form->number('fade_time', 'fade时间')->default(1500); | ||
128 | $form->selectTable('font_file','字体') | 129 | $form->selectTable('font_file','字体') |
129 | ->title('字体选择') | 130 | ->title('字体选择') |
130 | ->from(FontTable::make()) | 131 | ->from(FontTable::make()) | ... | ... |
... | @@ -66,6 +66,12 @@ class DevFFmpeg extends Command | ... | @@ -66,6 +66,12 @@ class DevFFmpeg extends Command |
66 | */ | 66 | */ |
67 | public function handle() | 67 | public function handle() |
68 | { | 68 | { |
69 | +// $json = shell_exec(env('FFPROBE_CMD') . ' -v quiet -print_format json -show_format -show_streams ' . escapeshellarg(storage_path('app/public/uploads/131/309/K4LTgHuDhcmDr3MZBDkd0vyMUmRbfBxrFbU0CoNs.png')). ' 2>&1'); | ||
70 | +// $arr = json_decode($json,true); | ||
71 | +// dd($arr); | ||
72 | +// dd(AdminMakeVideo::query()->find(1)->poem2()); | ||
73 | + dd(AdminMakeVideo::query()->find(1)->poem2->verses->toArray()); | ||
74 | + return 0; | ||
69 | dd(AdminMakeVideo::query()->find(33)->temp->components->toArray()); | 75 | dd(AdminMakeVideo::query()->find(33)->temp->components->toArray()); |
70 | AdminMakeImmerse::dispatch(AdminMakeVideo::query()->find(33)->temp->components); | 76 | AdminMakeImmerse::dispatch(AdminMakeVideo::query()->find(33)->temp->components); |
71 | 77 | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -38,6 +38,11 @@ class AdminMakeVideo extends Model | ... | @@ -38,6 +38,11 @@ class AdminMakeVideo extends Model |
38 | return $this->hasOne(OnePoem::class,'id','poem_id'); | 38 | return $this->hasOne(OnePoem::class,'id','poem_id'); |
39 | } | 39 | } |
40 | 40 | ||
41 | + public function poem2() | ||
42 | + { | ||
43 | + return $this->hasOne(OnePoem2::class,'id','poem_id'); | ||
44 | + } | ||
45 | + | ||
41 | public function temp() | 46 | public function temp() |
42 | { | 47 | { |
43 | return $this->hasOne(VideoTemp::class,'id','temp_id'); | 48 | return $this->hasOne(VideoTemp::class,'id','temp_id'); | ... | ... |
... | @@ -34,7 +34,7 @@ class VideoTemp extends Model | ... | @@ -34,7 +34,7 @@ class VideoTemp extends Model |
34 | public function componentsTable() | 34 | public function componentsTable() |
35 | { | 35 | { |
36 | return $this->hasMany('App\Models\Component', 'temp_id') | 36 | return $this->hasMany('App\Models\Component', 'temp_id') |
37 | - ->select(['id', 'temp_id', 'name', 'position', 'font_size', 'text_color', 'text_bg_color', 'text_bg_box','opacity','fix_bounds']); | 37 | + ->select(['id', 'temp_id', 'name', 'position', 'font_size', 'text_color', 'text_bg_color', 'text_bg_box','opacity']); |
38 | } | 38 | } |
39 | 39 | ||
40 | public function admin_make_video() | 40 | public function admin_make_video() | ... | ... |
... | @@ -17,6 +17,7 @@ class UpdateComponentsTable extends Migration | ... | @@ -17,6 +17,7 @@ class UpdateComponentsTable extends Migration |
17 | 17 | ||
18 | Schema::table('components', function (Blueprint $table) { | 18 | Schema::table('components', function (Blueprint $table) { |
19 | $table->string('draw')->after('position')->comment('文字效果'); | 19 | $table->string('draw')->after('position')->comment('文字效果'); |
20 | + $table->integer('fade_time')->after('draw')->default(1500)->comment('fade切换时间(毫秒)'); | ||
20 | }); | 21 | }); |
21 | } | 22 | } |
22 | 23 | ||
... | @@ -27,6 +28,8 @@ class UpdateComponentsTable extends Migration | ... | @@ -27,6 +28,8 @@ class UpdateComponentsTable extends Migration |
27 | */ | 28 | */ |
28 | public function down() | 29 | public function down() |
29 | { | 30 | { |
31 | + Schema::dropColumns('components', ['draw', 'fade_time']); | ||
32 | + | ||
30 | Schema::table('components', function (Blueprint $table) { | 33 | Schema::table('components', function (Blueprint $table) { |
31 | $table->string('fix_bounds')->after('opacity')->comment('超出避免剪切'); | 34 | $table->string('fix_bounds')->after('opacity')->comment('超出避免剪切'); |
32 | }); | 35 | }); | ... | ... |
-
Please register or login to post a comment