diff --git a/.changelog/2582.txt b/.changelog/2582.txt new file mode 100644 index 0000000000..4b169ef416 --- /dev/null +++ b/.changelog/2582.txt @@ -0,0 +1,7 @@ +```release-note:enhancement +resource/tencentcloud_vod_adaptive_dynamic_streaming_template: add param `segment_type` +``` + +```release-note:enhancement +resource/tencentcloud_vod_procedure_template: update param `adaptive_dynamic_streaming_task_list` and `review_audio_video_task` +``` \ No newline at end of file diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md index 3da5667232..27ce2c5558 100644 --- a/tencentcloud/provider.md +++ b/tencentcloud/provider.md @@ -1117,7 +1117,6 @@ Video on Demand(VOD) tencentcloud_vod_procedure_template tencentcloud_vod_snapshot_by_time_offset_template tencentcloud_vod_image_sprite_template - tencentcloud_vod_super_player_config tencentcloud_vod_sub_application tencentcloud_vod_sample_snapshot_template tencentcloud_vod_transcode_template diff --git a/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template.go b/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template.go index 4bb304400a..217942ef87 100644 --- a/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template.go +++ b/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template.go @@ -234,6 +234,15 @@ func ResourceTencentCloudVodAdaptiveDynamicStreamingTemplate() *schema.Resource }, }, }, + "segment_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Description: "Segment type, valid when Format is HLS, optional values:\n" + + "- ts: ts segment;\n" + + "- fmp4: fmp4 segment;\n" + + "Default value: ts.", + }, // computed "create_time": { Type: schema.TypeString, @@ -257,6 +266,9 @@ func resourceTencentCloudVodAdaptiveDynamicStreamingTemplateCreate(d *schema.Res request = vod.NewCreateAdaptiveDynamicStreamingTemplateRequest() ) + if v, ok := d.GetOk("segment_type"); ok { + request.SegmentType = helper.String(v.(string)) + } request.Format = helper.String(d.Get("format").(string)) request.Name = helper.String(d.Get("name").(string)) if v, ok := d.GetOk("drm_type"); ok { @@ -403,6 +415,7 @@ func resourceTencentCloudVodAdaptiveDynamicStreamingTemplateRead(d *schema.Resou _ = d.Set("comment", template.Comment) _ = d.Set("create_time", template.CreateTime) _ = d.Set("update_time", template.UpdateTime) + _ = d.Set("segment_type", template.SegmentType) var streamInfos = make([]interface{}, 0, len(template.StreamInfos)) for _, v := range template.StreamInfos { diff --git a/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template_test.go b/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template_test.go index 59ec1ec241..d2346110a2 100644 --- a/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template_test.go +++ b/tencentcloud/services/vod/resource_tc_vod_adaptive_dynamic_streaming_template_test.go @@ -83,6 +83,7 @@ func TestAccTencentCloudVodAdaptiveDynamicStreamingTemplateResource(t *testing.T resource.TestCheckResourceAttrSet("tencentcloud_vod_adaptive_dynamic_streaming_template.foo", "create_time"), resource.TestCheckResourceAttrSet("tencentcloud_vod_adaptive_dynamic_streaming_template.foo", "update_time"), resource.TestCheckResourceAttrSet("tencentcloud_vod_adaptive_dynamic_streaming_template.foo", "sub_app_id"), + resource.TestCheckResourceAttr("tencentcloud_vod_adaptive_dynamic_streaming_template.foo", "segment_type", "ts"), ), }, { diff --git a/tencentcloud/services/vod/resource_tc_vod_procedure_template.go b/tencentcloud/services/vod/resource_tc_vod_procedure_template.go index b0e8aaa928..3523cec212 100644 --- a/tencentcloud/services/vod/resource_tc_vod_procedure_template.go +++ b/tencentcloud/services/vod/resource_tc_vod_procedure_template.go @@ -334,6 +334,15 @@ func ResourceTencentCloudVodProcedureTemplate() *schema.Resource { Description: "List of up to `10` image or text watermarks. Note: this field may return null, indicating that no valid values can be obtained.", Elem: VodWatermarkResource(), }, + "subtitle_list": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Description: "Subtitle list, element is subtitle ID, support multiple subtitles, up to 16.", + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, }, }, }, @@ -393,6 +402,12 @@ func ResourceTencentCloudVodProcedureTemplate() *schema.Resource { "- `Media`: The original audio/video;\n" + "- `Cover`: Thumbnails.", }, + "definition": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Description: "Review template.", + }, }, }, }, @@ -724,6 +739,17 @@ func generateMediaProcessTask(d *schema.ResourceData) (mediaReq *vod.MediaProces return &idUint }(item["definition"].(string)), WatermarkSet: genWatermarkList(item), + SubtitleSet: func() (list []*string) { + if _, ok := item["subtitle_list"]; !ok { + return nil + } + subtitleList := item["subtitle_list"].([]interface{}) + list = make([]*string, 0, len(subtitleList)) + for _, subTitle := range subtitleList { + list = append(list, helper.String(subTitle.(string))) + } + return list + }(), }) } mediaReq.AdaptiveDynamicStreamingTaskSet = adaptiveReq @@ -1084,6 +1110,16 @@ func resourceTencentCloudVodProcedureTemplateRead(d *schema.ResourceData, meta i } return waterList }(), + "subtitle_list": func() interface{} { + if item.SubtitleSet == nil { + return nil + } + subtitleList := make([]interface{}, 0, len(item.SubtitleSet)) + for _, subtitleV := range item.SubtitleSet { + subtitleList = append(subtitleList, subtitleV) + } + return subtitleList + }(), }) } mediaProcessTaskElem["adaptive_dynamic_streaming_task_list"] = list diff --git a/website/docs/r/vod_adaptive_dynamic_streaming_template.html.markdown b/website/docs/r/vod_adaptive_dynamic_streaming_template.html.markdown index 01e00af27e..faa5735271 100644 --- a/website/docs/r/vod_adaptive_dynamic_streaming_template.html.markdown +++ b/website/docs/r/vod_adaptive_dynamic_streaming_template.html.markdown @@ -59,6 +59,10 @@ The following arguments are supported: * `disable_higher_video_bitrate` - (Optional, Bool) Whether to prohibit transcoding video from low bitrate to high bitrate. Valid values: `false`,`true`. `false`: no, `true`: yes. Default value: `false`. * `disable_higher_video_resolution` - (Optional, Bool) Whether to prohibit transcoding from low resolution to high resolution. Valid values: `false`,`true`. `false`: no, `true`: yes. Default value: `false`. * `drm_type` - (Optional, String, ForceNew) DRM scheme type. Valid values: `SimpleAES`. If this field is an empty string, DRM will not be performed on the video. +* `segment_type` - (Optional, String) Segment type, valid when Format is HLS, optional values: +- ts: ts segment; +- fmp4: fmp4 segment; +Default value: ts. * `sub_app_id` - (Optional, Int) The VOD [application](https://intl.cloud.tencent.com/document/product/266/14574) ID. For customers who activate VOD service from December 25, 2023, if they want to access resources in a VOD application (whether it's the default application or a newly created one), they must fill in this field with the application ID. The `audio` object of `stream_info` supports the following: diff --git a/website/docs/r/vod_procedure_template.html.markdown b/website/docs/r/vod_procedure_template.html.markdown index 659db1466a..4ae5da1441 100644 --- a/website/docs/r/vod_procedure_template.html.markdown +++ b/website/docs/r/vod_procedure_template.html.markdown @@ -155,6 +155,7 @@ The following arguments are supported: The `adaptive_dynamic_streaming_task_list` object of `media_process_task` supports the following: * `definition` - (Required, String) Adaptive bitrate streaming template ID. +* `subtitle_list` - (Optional, List) Subtitle list, element is subtitle ID, support multiple subtitles, up to 16. * `watermark_list` - (Optional, List) List of up to `10` image or text watermarks. Note: this field may return null, indicating that no valid values can be obtained. The `ai_analysis_task` object supports the following: @@ -212,6 +213,7 @@ The `mosaic_list` object of `transcode_task_list` supports the following: The `review_audio_video_task` object supports the following: +* `definition` - (Optional, String) Review template. * `review_contents` - (Optional, List) The type of moderated content. Valid values: - `Media`: The original audio/video; - `Cover`: Thumbnails. diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index 92074bdab9..c77c4c8807 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -5881,9 +5881,6 @@
  • tencentcloud_vod_sub_application
  • -
  • - tencentcloud_vod_super_player_config -
  • tencentcloud_vod_transcode_template