Просмотр исходного кода

3-3 subtitle

private_deployment
谈文友 1 год назад
Родитель
Сommit
ff240838de
2 измененных файлов: 59 добавлений и 57 удалений
  1. +27
    -25
      suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java
  2. +32
    -32
      suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java

+ 27
- 25
suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java Просмотреть файл

@@ -248,34 +248,36 @@ public class PhotoSpeakVideoController extends BaseController {
//
if (mouldVideo.getSubtitleEnabled()==1){
// 开启字幕
mouldVideoUpd.setSubtitleEnabled(1);
Map params = new HashMap();
JSONObject subtitle = JSON.parseObject(mouldVideo.getSubtitleParams());
params.put("Fontname",(subtitle.get("Fontname")==null?"宋体":subtitle.get("Fontname")));
params.put("Fontsize",(subtitle.get("Fontsize")==null? 25:subtitle.get("Fontsize")));
params.put("PrimaryColour",(subtitle.get("PrimaryColour")==null?"&Hffffff":subtitle.get("PrimaryColour")));
params.put("SecondaryColour",(subtitle.get("SecondaryColour")==null?"BBGGRR":subtitle.get("SecondaryColour")));
params.put("OutlineColour",(subtitle.get("OutlineColour")==null?"BBGGRR":subtitle.get("OutlineColour")));
params.put("BackColour",(subtitle.get("BackColour")==null?"&H0000ff":subtitle.get("BackColour")));
params.put("Bold",(subtitle.get("Bold")==null? -1:subtitle.get("Bold")));
params.put("Italic",(subtitle.get("Italic")==null? 0:subtitle.get("Italic")));
params.put("Underline",(subtitle.get("Underline")==null? 0:subtitle.get("Underline")));
params.put("Strikeout",(subtitle.get("Strikeout")==null? 0:subtitle.get("Strikeout")));
params.put("ScaleX",(subtitle.get("ScaleX")==null? 100:subtitle.get("ScaleX")));
params.put("ScaleY",(subtitle.get("ScaleY")==null? 100:subtitle.get("ScaleY")));
params.put("Spacing",(subtitle.get("Spacing")==null? 0:subtitle.get("Spacing")));
params.put("Angle",(subtitle.get("Angle")==null? 15:subtitle.get("Angle")));
params.put("BorderStyle",(subtitle.get("BorderStyle")==null?"1":subtitle.get("BorderStyle")));
params.put("Outline",(subtitle.get("Outline")==null? 20:subtitle.get("Outline")));
params.put("Shadow",(subtitle.get("Shadow")==null? 12:subtitle.get("Shadow")));
params.put("Alignment",(subtitle.get("Alignment")==null? 1:subtitle.get("Alignment")));
params.put("MarginL",(subtitle.get("MarginL")==null? 100:subtitle.get("MarginL")));
params.put("MarginR",(subtitle.get("MarginR")==null? 100:subtitle.get("MarginR")));
params.put("MarginV",(subtitle.get("MarginV")==null? 100:subtitle.get("MarginV")));
subtitle.put("enabled",1);
subtitle.put("text",mouldVideo.getPaperwork());
subtitle.put("params",params);
subtitle.put("Fontname",(subtitle.get("Fontname")==null?"宋体":subtitle.get("Fontname")));
subtitle.put("Fontsize",(subtitle.get("Fontsize")==null? 25:subtitle.get("Fontsize")));
subtitle.put("PrimaryColour",(subtitle.get("PrimaryColour")==null?"&Hffffff":subtitle.get("PrimaryColour")));
subtitle.put("SecondaryColour",(subtitle.get("SecondaryColour")==null?"BBGGRR":subtitle.get("SecondaryColour")));
subtitle.put("OutlineColour",(subtitle.get("OutlineColour")==null?"BBGGRR":subtitle.get("OutlineColour")));
subtitle.put("BackColour",(subtitle.get("BackColour")==null?"&H0000ff":subtitle.get("BackColour")));
subtitle.put("Bold",(subtitle.get("Bold")==null? -1:subtitle.get("Bold")));
subtitle.put("Italic",(subtitle.get("Italic")==null? 0:subtitle.get("Italic")));
subtitle.put("Underline",(subtitle.get("Underline")==null? 0:subtitle.get("Underline")));
subtitle.put("Strikeout",(subtitle.get("Strikeout")==null? 0:subtitle.get("Strikeout")));
subtitle.put("ScaleX",(subtitle.get("ScaleX")==null? 100:subtitle.get("ScaleX")));
subtitle.put("ScaleY",(subtitle.get("ScaleY")==null? 100:subtitle.get("ScaleY")));
subtitle.put("Spacing",(subtitle.get("Spacing")==null? 0:subtitle.get("Spacing")));
subtitle.put("Angle",(subtitle.get("Angle")==null? 15:subtitle.get("Angle")));
subtitle.put("BorderStyle",(subtitle.get("BorderStyle")==null?"1":subtitle.get("BorderStyle")));
subtitle.put("Outline",(subtitle.get("Outline")==null? 20:subtitle.get("Outline")));
subtitle.put("Shadow",(subtitle.get("Shadow")==null? 12:subtitle.get("Shadow")));
subtitle.put("Alignment",(subtitle.get("Alignment")==null? 1:subtitle.get("Alignment")));
subtitle.put("MarginL",(subtitle.get("MarginL")==null? 100:subtitle.get("MarginL")));
subtitle.put("MarginR",(subtitle.get("MarginR")==null? 100:subtitle.get("MarginR")));
subtitle.put("MarginV",(subtitle.get("MarginV")==null? 100:subtitle.get("MarginV")));
// subtitle.put("enabled",1);
//subtitle.put("text",mouldVideo.getPaperwork());
// subtitle.put("params",params);
mouldVideoUpd.setSubtitleParams(String.valueOf(subtitle));
videoUpd.setSubtitleParams(String.valueOf(subtitle));
videoUpd.setSubtitleEnabled(1);
}//
photoSpeakVideoService.saveOrUpdate(mouldVideoUpd);



+ 32
- 32
suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java Просмотреть файл

@@ -220,38 +220,38 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService {

Integer voiceFrom = photoSpeakVideo.getVoiceFrom();
String voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl();
// if (photoSpeakVideo.getSubtitleEnabled()==1){
//// //开启字幕 查询字幕列表
// Map reSubtitle = new HashMap();
// Map params = new HashMap();
// JSONObject subtitle = JSON.parseObject(photoSpeakVideo.getSubtitleParams());
// params.put("Fontname",(subtitle.get("Fontname")==null?"宋体":subtitle.get("Fontname")));
// params.put("Fontsize",(subtitle.get("Fontsize")==null? 25:subtitle.get("Fontsize")));
// params.put("PrimaryColour",(subtitle.get("PrimaryColour")==null?"&Hffffff":subtitle.get("PrimaryColour")));
// params.put("SecondaryColour",(subtitle.get("SecondaryColour")==null?"BBGGRR":subtitle.get("SecondaryColour")));
// params.put("OutlineColour",(subtitle.get("OutlineColour")==null?"BBGGRR":subtitle.get("OutlineColour")));
// params.put("BackColour",(subtitle.get("BackColour")==null?"&H0000ff":subtitle.get("BackColour")));
// params.put("Bold",(subtitle.get("Bold")==null? -1:subtitle.get("Bold")));
// params.put("Italic",(subtitle.get("Italic")==null? 0:subtitle.get("Italic")));
// params.put("Underline",(subtitle.get("Underline")==null? 0:subtitle.get("Underline")));
// params.put("Strikeout",(subtitle.get("Strikeout")==null? 0:subtitle.get("Strikeout")));
// params.put("ScaleX",(subtitle.get("ScaleX")==null? 100:subtitle.get("ScaleX")));
// params.put("ScaleY",(subtitle.get("ScaleY")==null? 100:subtitle.get("ScaleY")));
// params.put("Spacing",(subtitle.get("Spacing")==null? 0:subtitle.get("Spacing")));
// params.put("Angle",(subtitle.get("Angle")==null? 15:subtitle.get("Angle")));
// params.put("BorderStyle",(subtitle.get("BorderStyle")==null?"1":subtitle.get("BorderStyle")));
// params.put("Outline",(subtitle.get("Outline")==null? 20:subtitle.get("Outline")));
// params.put("Shadow",(subtitle.get("Shadow")==null? 12:subtitle.get("Shadow")));
// params.put("Alignment",(subtitle.get("Alignment")==null? 1:subtitle.get("Alignment")));
// params.put("MarginL",(subtitle.get("MarginL")==null? 100:subtitle.get("MarginL")));
// params.put("MarginR",(subtitle.get("MarginR")==null? 100:subtitle.get("MarginR")));
// params.put("MarginV",(subtitle.get("MarginV")==null? 100:subtitle.get("MarginV")));
// subtitle.put("enabled",1);
// subtitle.put("text",photoSpeakVideo.getPaperwork());
// subtitle.put("params",params);
// param.setSubtitle_params(subtitle);
//
// }
if (photoSpeakVideo.getSubtitleEnabled()==1){
// //开启字幕 查询字幕列表
Map reSubtitle = new HashMap();
Map params = new HashMap();
JSONObject subtitle = JSON.parseObject(photoSpeakVideo.getSubtitleParams());
params.put("Fontname",(subtitle.get("Fontname")==null?"宋体":subtitle.get("Fontname")));
params.put("Fontsize",(subtitle.get("Fontsize")==null? 25:subtitle.get("Fontsize")));
params.put("PrimaryColour",(subtitle.get("PrimaryColour")==null?"&Hffffff":subtitle.get("PrimaryColour")));
params.put("SecondaryColour",(subtitle.get("SecondaryColour")==null?"BBGGRR":subtitle.get("SecondaryColour")));
params.put("OutlineColour",(subtitle.get("OutlineColour")==null?"BBGGRR":subtitle.get("OutlineColour")));
params.put("BackColour",(subtitle.get("BackColour")==null?"&H0000ff":subtitle.get("BackColour")));
params.put("Bold",(subtitle.get("Bold")==null? -1:subtitle.get("Bold")));
params.put("Italic",(subtitle.get("Italic")==null? 0:subtitle.get("Italic")));
params.put("Underline",(subtitle.get("Underline")==null? 0:subtitle.get("Underline")));
params.put("Strikeout",(subtitle.get("Strikeout")==null? 0:subtitle.get("Strikeout")));
params.put("ScaleX",(subtitle.get("ScaleX")==null? 100:subtitle.get("ScaleX")));
params.put("ScaleY",(subtitle.get("ScaleY")==null? 100:subtitle.get("ScaleY")));
params.put("Spacing",(subtitle.get("Spacing")==null? 0:subtitle.get("Spacing")));
params.put("Angle",(subtitle.get("Angle")==null? 15:subtitle.get("Angle")));
params.put("BorderStyle",(subtitle.get("BorderStyle")==null?"1":subtitle.get("BorderStyle")));
params.put("Outline",(subtitle.get("Outline")==null? 20:subtitle.get("Outline")));
params.put("Shadow",(subtitle.get("Shadow")==null? 12:subtitle.get("Shadow")));
params.put("Alignment",(subtitle.get("Alignment")==null? 1:subtitle.get("Alignment")));
params.put("MarginL",(subtitle.get("MarginL")==null? 100:subtitle.get("MarginL")));
params.put("MarginR",(subtitle.get("MarginR")==null? 100:subtitle.get("MarginR")));
params.put("MarginV",(subtitle.get("MarginV")==null? 100:subtitle.get("MarginV")));
subtitle.put("enabled",1);
subtitle.put("text",photoSpeakVideo.getPaperwork());
subtitle.put("params",params);
param.setSubtitle_params(subtitle);
}
// List<PhotoSpeakVideo> videoMapperList = photoSpeakVideoMapper.findList(speakVideoUpd);
// for (PhotoSpeakVideo speakVideo : videoMapperList) {
// if (speakVideo.getSubtitleEnabled()==1){


Загрузка…
Отмена
Сохранить