fastpixapi 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/crystalline/metadata_fields.rb +2 -0
  3. data/lib/crystalline/module.rb +12 -13
  4. data/lib/fastpix_client/dimensions.rb +3 -3
  5. data/lib/fastpix_client/errors.rb +1 -1
  6. data/lib/fastpix_client/in_video_ai_features.rb +8 -8
  7. data/lib/fastpix_client/input_video.rb +4 -3
  8. data/lib/fastpix_client/live_playback.rb +253 -0
  9. data/lib/fastpix_client/manage_live_stream.rb +13 -12
  10. data/lib/fastpix_client/manage_videos.rb +21 -23
  11. data/lib/fastpix_client/metrics.rb +3 -3
  12. data/lib/fastpix_client/models/components/addtrackrequest.rb +6 -2
  13. data/lib/fastpix_client/models/components/addtrackrequest.rbi +2 -0
  14. data/lib/fastpix_client/models/components/addtrackresponse.rb +6 -2
  15. data/lib/fastpix_client/models/components/addtrackresponse.rbi +2 -0
  16. data/lib/fastpix_client/models/components/audiotrack.rb +6 -2
  17. data/lib/fastpix_client/models/components/audiotrack.rbi +2 -0
  18. data/lib/fastpix_client/models/components/generatetrackresponse.rb +6 -2
  19. data/lib/fastpix_client/models/components/generatetrackresponse.rbi +2 -0
  20. data/lib/fastpix_client/models/components/getallmediaresponse.rb +11 -13
  21. data/lib/fastpix_client/models/components/getallmediaresponse.rbi +3 -1
  22. data/lib/fastpix_client/models/components/getallmediaresponse_mp4support.rb +32 -12
  23. data/lib/fastpix_client/models/components/getallmediaresponse_mp4support.rbi +11 -1
  24. data/lib/fastpix_client/models/components/getallmediaresponse_sourceresolution.rb +2 -0
  25. data/lib/fastpix_client/models/components/{getmediaresponse.rb → getmediadetailresponse.rb} +16 -18
  26. data/lib/fastpix_client/models/components/{getmediaresponse.rbi → getmediadetailresponse.rbi} +5 -3
  27. data/lib/fastpix_client/models/components/{getmediaresponse_maxresolution.rb → getmediadetailresponse_maxresolution.rb} +2 -2
  28. data/lib/fastpix_client/models/components/getmediadetailresponse_maxresolution.rbi +11 -0
  29. data/lib/fastpix_client/models/components/{getmediaresponse_mediaquality.rb → getmediadetailresponse_mediaquality.rb} +2 -2
  30. data/lib/fastpix_client/models/components/getmediadetailresponse_mediaquality.rbi +11 -0
  31. data/lib/fastpix_client/models/components/getmediadetailresponse_mp4support.rb +48 -0
  32. data/lib/fastpix_client/models/components/getmediadetailresponse_mp4support.rbi +21 -0
  33. data/lib/fastpix_client/models/components/{getmediaresponse_sourceresolution.rb → getmediadetailresponse_sourceresolution.rb} +4 -2
  34. data/lib/fastpix_client/models/components/getmediadetailresponse_sourceresolution.rbi +11 -0
  35. data/lib/fastpix_client/models/components/{getmediaresponse_status.rb → getmediadetailresponse_status.rb} +2 -2
  36. data/lib/fastpix_client/models/components/getmediadetailresponse_status.rbi +11 -0
  37. data/lib/fastpix_client/models/components/{getmediaresponse_track.rb → getmediadetailresponse_track.rb} +1 -1
  38. data/lib/fastpix_client/models/components/getmediadetailresponse_track.rbi +11 -0
  39. data/lib/fastpix_client/models/components/inputmediasettings.rb +7 -2
  40. data/lib/fastpix_client/models/components/inputmediasettings.rbi +2 -0
  41. data/lib/fastpix_client/models/components/live_media_clips.rb +11 -13
  42. data/lib/fastpix_client/models/components/live_media_clips.rbi +3 -1
  43. data/lib/fastpix_client/models/components/live_media_clips_mp4support.rb +32 -12
  44. data/lib/fastpix_client/models/components/live_media_clips_mp4support.rbi +11 -1
  45. data/lib/fastpix_client/models/components/live_media_clips_sourceresolution.rb +2 -0
  46. data/lib/fastpix_client/models/components/media.rb +11 -13
  47. data/lib/fastpix_client/models/components/media.rbi +3 -1
  48. data/lib/fastpix_client/models/components/media_mp4support.rb +32 -12
  49. data/lib/fastpix_client/models/components/media_mp4support.rbi +11 -1
  50. data/lib/fastpix_client/models/components/media_sourceresolution.rb +2 -0
  51. data/lib/fastpix_client/models/components/mediaclipresponse_data.rb +2 -2
  52. data/lib/fastpix_client/models/components/mediaclipresponse_data.rbi +1 -1
  53. data/lib/fastpix_client/models/components/playbackidrequest.rb +6 -2
  54. data/lib/fastpix_client/models/components/playbackidrequest.rbi +3 -1
  55. data/lib/fastpix_client/models/components/playbackidresponse.rb +6 -2
  56. data/lib/fastpix_client/models/components/playbackidresponse.rbi +3 -1
  57. data/lib/fastpix_client/models/components/playbackidsuccessresponse_data.rb +6 -2
  58. data/lib/fastpix_client/models/components/playbackidsuccessresponse_data.rbi +3 -1
  59. data/lib/fastpix_client/models/components/playbacksettings.rb +6 -2
  60. data/lib/fastpix_client/models/components/playbacksettings.rbi +3 -1
  61. data/lib/fastpix_client/models/components/playlistbyidresponsemedialistitem.rb +2 -2
  62. data/lib/fastpix_client/models/components/playlistbyidresponsemedialistitem.rbi +1 -1
  63. data/lib/fastpix_client/models/components/sourceaccessmedia.rb +11 -13
  64. data/lib/fastpix_client/models/components/sourceaccessmedia.rbi +3 -1
  65. data/lib/fastpix_client/models/components/sourceaccessmedia_mp4support.rb +32 -12
  66. data/lib/fastpix_client/models/components/sourceaccessmedia_mp4support.rbi +11 -1
  67. data/lib/fastpix_client/models/components/sourceaccessmedia_sourceresolution.rb +2 -0
  68. data/lib/fastpix_client/models/components/subtitletrack.rb +6 -2
  69. data/lib/fastpix_client/models/components/subtitletrack.rbi +2 -0
  70. data/lib/fastpix_client/models/components/tracksubtitlesgeneraterequest.rb +6 -2
  71. data/lib/fastpix_client/models/components/tracksubtitlesgeneraterequest.rbi +2 -0
  72. data/lib/fastpix_client/models/components/update_media.rb +11 -13
  73. data/lib/fastpix_client/models/components/update_media.rbi +3 -1
  74. data/lib/fastpix_client/models/components/update_media_maxresolution.rb +0 -1
  75. data/lib/fastpix_client/models/components/update_media_mp4support.rb +32 -12
  76. data/lib/fastpix_client/models/components/update_media_mp4support.rbi +11 -1
  77. data/lib/fastpix_client/models/components/updatetrackrequest.rb +7 -7
  78. data/lib/fastpix_client/models/components/updatetrackrequest.rbi +2 -2
  79. data/lib/fastpix_client/models/components/updatetrackresponse.rb +6 -2
  80. data/lib/fastpix_client/models/components/updatetrackresponse.rbi +2 -0
  81. data/lib/fastpix_client/models/components/videotrack.rb +6 -2
  82. data/lib/fastpix_client/models/components/videotrack.rbi +2 -0
  83. data/lib/fastpix_client/models/components/videotrackforgetall.rb +6 -2
  84. data/lib/fastpix_client/models/components/videotrackforgetall.rbi +2 -0
  85. data/lib/fastpix_client/models/components.rb +7 -7
  86. data/lib/fastpix_client/models/operations/get_media_response.rb +1 -1
  87. data/lib/fastpix_client/models/operations/get_media_responsebody.rb +2 -2
  88. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_data.rb +40 -0
  89. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_data.rbi +17 -0
  90. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_defaultpolicy.rb +21 -0
  91. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_defaultpolicy.rbi +11 -0
  92. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_request.rb +40 -0
  93. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_request.rbi +17 -0
  94. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_requestbody.rb +40 -0
  95. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_requestbody.rbi +17 -0
  96. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_response.rb +48 -0
  97. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_response.rbi +21 -0
  98. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_responsebody.rb +36 -0
  99. data/lib/fastpix_client/models/operations/update_live_stream_domain_restrictions_responsebody.rbi +15 -0
  100. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_data.rb +40 -0
  101. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_data.rbi +17 -0
  102. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_defaultpolicy.rb +21 -0
  103. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_defaultpolicy.rbi +11 -0
  104. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_request.rb +40 -0
  105. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_request.rbi +17 -0
  106. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_requestbody.rb +40 -0
  107. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_requestbody.rbi +17 -0
  108. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_response.rb +48 -0
  109. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_response.rbi +21 -0
  110. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_responsebody.rb +36 -0
  111. data/lib/fastpix_client/models/operations/update_live_stream_user_agent_restrictions_responsebody.rbi +15 -0
  112. data/lib/fastpix_client/models/operations.rb +12 -0
  113. data/lib/fastpix_client/playlist.rb +2 -1
  114. data/lib/fastpix_client/sdkconfiguration.rb +3 -3
  115. data/lib/fastpix_client/simulcast_stream.rb +3 -3
  116. data/lib/fastpix_client/start_live_stream.rb +4 -4
  117. data/lib/fastpix_client/views.rb +3 -3
  118. metadata +58 -56
  119. data/lib/fastpix_client/models/components/getmediaresponse_maxresolution.rbi +0 -11
  120. data/lib/fastpix_client/models/components/getmediaresponse_mediaquality.rbi +0 -11
  121. data/lib/fastpix_client/models/components/getmediaresponse_mp4support.rb +0 -28
  122. data/lib/fastpix_client/models/components/getmediaresponse_mp4support.rbi +0 -11
  123. data/lib/fastpix_client/models/components/getmediaresponse_sourceresolution.rbi +0 -11
  124. data/lib/fastpix_client/models/components/getmediaresponse_status.rbi +0 -11
  125. data/lib/fastpix_client/models/components/getmediaresponse_track.rbi +0 -11
  126. data/test/sdk_examples_test.rb +0 -20
  127. data/test/test_helper.rb +0 -29
@@ -8,7 +8,7 @@ module FastpixClient
8
8
  module Models
9
9
  module Components
10
10
 
11
- class GetMediaResponse
11
+ class GetMediaDetailResponse
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -21,18 +21,13 @@ module FastpixClient
21
21
  # The ID of the livestream for which the clips were created.
22
22
  field :stream_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('streamId') } }
23
23
  # The quality tier applied to the media.
24
- field :media_quality, Crystalline::Nilable.new(Models::Components::GetMediaResponseMediaQuality), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mediaQuality'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaResponseMediaQuality, true) } }
24
+ field :media_quality, Crystalline::Nilable.new(Models::Components::GetMediaDetailResponseMediaQuality), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mediaQuality'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaDetailResponseMediaQuality, true) } }
25
25
  # The unique identifier of the user who created this media.
26
26
  field :creator_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('creatorId') } }
27
27
  # Determines the media's status, which can be one of the possible values.
28
- field :status, Crystalline::Nilable.new(Models::Components::GetMediaResponseStatus), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaResponseStatus, true) } }
29
- # Determines the type of MP4 support for the media.
30
- # - **none**: Disables MP4 support.
31
- # - **capped_4k**: Enables MP4 downloads with resolutions up to 4K.
32
- # - **audioOnly**: Provides an MP4 stream containing only the audio.
33
- # - **audioOnly,capped_4k**: Enables both MP4 video downloads (up to 4K) and an audio-only stream.
34
- #
35
- field :mp4_support, Crystalline::Nilable.new(Models::Components::GetMediaResponseMp4Support), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mp4Support'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaResponseMp4Support, true) } }
28
+ field :status, Crystalline::Nilable.new(Models::Components::GetMediaDetailResponseStatus), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaDetailResponseStatus, true) } }
29
+ # The MP4 renditions generated for the media. Present only when MP4 support is enabled.
30
+ field :mp4_support, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::GetMediaDetailResponseMp4Support)), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mp4Support') } }
36
31
  # A collection of Playback ID objects utilized for crafting HLS playback URLs.
37
32
  field :playback_ids, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::PlaybackId)), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('playbackIds') } }
38
33
  # A media consists of different media tracks, like video, audio, and subtitle, all combined.
@@ -45,8 +40,8 @@ module FastpixClient
45
40
  field :named_entities, Crystalline::Nilable.new(Models::Components::AiResponseRecord), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('namedEntities') } }
46
41
  # Represents an AI response record containing status and data for AI-generated features like summary, chapters, named entities, or moderation.
47
42
  field :moderation, Crystalline::Nilable.new(Models::Components::AiResponseRecord), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('moderation') } }
48
- # The length of the media in seconds, with a maximum allowed duration of 12 hours per individual media.
49
- field :duration, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('duration') } }
43
+ # Duration of the media in seconds.
44
+ field :duration, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('duration') } }
50
45
  # Frame rate quantifies the speed at which frames are displayed per second. It represents the range of frames available for a specific track. The indeterminable frame rate of the input file is indicated by a value of -1.
51
46
  field :frame_rate, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('frameRate') } }
52
47
  # Time the media was created, defined as a localDateTime (UTC Time).
@@ -61,9 +56,9 @@ module FastpixClient
61
56
  # Title of the media file.
62
57
  field :title, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('title') } }
63
58
  # The maximum resolution specified by the user for the media.
64
- field :max_resolution, Crystalline::Nilable.new(Models::Components::GetMediaResponseMaxResolution), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('maxResolution'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaResponseMaxResolution, true) } }
59
+ field :max_resolution, Crystalline::Nilable.new(Models::Components::GetMediaDetailResponseMaxResolution), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('maxResolution'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaDetailResponseMaxResolution, true) } }
65
60
  # The actual resolution of the uploaded media. This represents the native quality of the source media.
66
- field :source_resolution, Crystalline::Nilable.new(Models::Components::GetMediaResponseSourceResolution), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('sourceResolution'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaResponseSourceResolution, true) } }
61
+ field :source_resolution, Crystalline::Nilable.new(Models::Components::GetMediaDetailResponseSourceResolution), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('sourceResolution'), 'decoder': Utils.enum_from_string(Models::Components::GetMediaDetailResponseSourceResolution, true) } }
67
62
  # The sourceAccess parameter determines whether the original media file is accessible. Set to true to enable access or false to restrict it.
68
63
  field :source_access, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('sourceAccess') } }
69
64
  # List of generated subtitle tracks associated with the media.
@@ -72,11 +67,13 @@ module FastpixClient
72
67
  field :is_audio_only, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('isAudioOnly') } }
73
68
  # Indicates whether subtitles are available for the media.
74
69
  field :subtitle_available, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('subtitleAvailable') } }
70
+ # Enhance the quality and volume of the audio track. This is available for pre-recorded content only.
71
+ field :optimize_audio, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('optimizeAudio') } }
75
72
  # The aspect ratio of a video is a value that describes the relative shape of a video based on its width and height.
76
73
  field :aspect_ratio, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('aspectRatio') } }
77
74
 
78
- sig { params(id: T.nilable(::String), source_media_id: T.nilable(::String), workspace_id: T.nilable(::String), stream_id: T.nilable(::String), media_quality: T.nilable(Models::Components::GetMediaResponseMediaQuality), creator_id: T.nilable(::String), status: T.nilable(Models::Components::GetMediaResponseStatus), mp4_support: T.nilable(Models::Components::GetMediaResponseMp4Support), playback_ids: T.nilable(T::Array[Models::Components::PlaybackId]), tracks: T.nilable(T::Array[T.any(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack)]), summary: T.nilable(Models::Components::AiSummaryRecord), chapters: T.nilable(Models::Components::AiResponseRecord), named_entities: T.nilable(Models::Components::AiResponseRecord), moderation: T.nilable(Models::Components::AiResponseRecord), duration: T.nilable(::String), frame_rate: T.nilable(::String), created_at: T.nilable(::DateTime), updated_at: T.nilable(::DateTime), thumbnail: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), title: T.nilable(::String), max_resolution: T.nilable(Models::Components::GetMediaResponseMaxResolution), source_resolution: T.nilable(Models::Components::GetMediaResponseSourceResolution), source_access: T.nilable(T::Boolean), generated_subtitles: T.nilable(T::Array[Models::Components::TracksSubtitles]), is_audio_only: T.nilable(T::Boolean), subtitle_available: T.nilable(T::Boolean), aspect_ratio: T.nilable(::String)).void }
79
- def initialize(id: nil, source_media_id: nil, workspace_id: nil, stream_id: nil, media_quality: nil, creator_id: nil, status: nil, mp4_support: nil, playback_ids: nil, tracks: nil, summary: nil, chapters: nil, named_entities: nil, moderation: nil, duration: nil, frame_rate: nil, created_at: nil, updated_at: nil, thumbnail: nil, metadata: nil, title: nil, max_resolution: Models::Components::GetMediaResponseMaxResolution::ONE_THOUSAND_AND_EIGHTYP, source_resolution: Models::Components::GetMediaResponseSourceResolution::ONE_THOUSAND_AND_EIGHTYP, source_access: nil, generated_subtitles: nil, is_audio_only: nil, subtitle_available: nil, aspect_ratio: nil)
75
+ sig { params(id: T.nilable(::String), source_media_id: T.nilable(::String), workspace_id: T.nilable(::String), stream_id: T.nilable(::String), media_quality: T.nilable(Models::Components::GetMediaDetailResponseMediaQuality), creator_id: T.nilable(::String), status: T.nilable(Models::Components::GetMediaDetailResponseStatus), mp4_support: T.nilable(T::Array[Models::Components::GetMediaDetailResponseMp4Support]), playback_ids: T.nilable(T::Array[Models::Components::PlaybackId]), tracks: T.nilable(T::Array[T.any(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack)]), summary: T.nilable(Models::Components::AiSummaryRecord), chapters: T.nilable(Models::Components::AiResponseRecord), named_entities: T.nilable(Models::Components::AiResponseRecord), moderation: T.nilable(Models::Components::AiResponseRecord), duration: T.nilable(::Float), frame_rate: T.nilable(::String), created_at: T.nilable(::DateTime), updated_at: T.nilable(::DateTime), thumbnail: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), title: T.nilable(::String), max_resolution: T.nilable(Models::Components::GetMediaDetailResponseMaxResolution), source_resolution: T.nilable(Models::Components::GetMediaDetailResponseSourceResolution), source_access: T.nilable(T::Boolean), generated_subtitles: T.nilable(T::Array[Models::Components::TracksSubtitles]), is_audio_only: T.nilable(T::Boolean), subtitle_available: T.nilable(T::Boolean), optimize_audio: T.nilable(T::Boolean), aspect_ratio: T.nilable(::String)).void }
76
+ def initialize(id: nil, source_media_id: nil, workspace_id: nil, stream_id: nil, media_quality: nil, creator_id: nil, status: nil, mp4_support: nil, playback_ids: nil, tracks: nil, summary: nil, chapters: nil, named_entities: nil, moderation: nil, duration: nil, frame_rate: nil, created_at: nil, updated_at: nil, thumbnail: nil, metadata: nil, title: nil, max_resolution: Models::Components::GetMediaDetailResponseMaxResolution::ONE_THOUSAND_AND_EIGHTYP, source_resolution: Models::Components::GetMediaDetailResponseSourceResolution::ONE_THOUSAND_AND_EIGHTYP, source_access: nil, generated_subtitles: nil, is_audio_only: nil, subtitle_available: nil, optimize_audio: nil, aspect_ratio: nil)
80
77
  @id = id
81
78
  @source_media_id = source_media_id
82
79
  @workspace_id = workspace_id
@@ -104,6 +101,7 @@ module FastpixClient
104
101
  @generated_subtitles = generated_subtitles
105
102
  @is_audio_only = is_audio_only
106
103
  @subtitle_available = subtitle_available
104
+ @optimize_audio = optimize_audio
107
105
  @aspect_ratio = aspect_ratio
108
106
  end
109
107
 
@@ -116,13 +114,13 @@ module FastpixClient
116
114
  @summary, @chapters, @named_entities, @moderation, @duration,
117
115
  @frame_rate, @created_at, @updated_at, @thumbnail, @metadata,
118
116
  @title, @max_resolution, @source_resolution, @source_access, @generated_subtitles,
119
- @is_audio_only, @subtitle_available, @aspect_ratio] ==
117
+ @is_audio_only, @subtitle_available, @optimize_audio, @aspect_ratio] ==
120
118
  [other.id, other.source_media_id, other.workspace_id, other.stream_id, other.media_quality,
121
119
  other.creator_id, other.status, other.mp4_support, other.playback_ids, other.tracks,
122
120
  other.summary, other.chapters, other.named_entities, other.moderation, other.duration,
123
121
  other.frame_rate, other.created_at, other.updated_at, other.thumbnail, other.metadata,
124
122
  other.title, other.max_resolution, other.source_resolution, other.source_access, other.generated_subtitles,
125
- other.is_audio_only, other.subtitle_available, other.aspect_ratio]
123
+ other.is_audio_only, other.subtitle_available, other.optimize_audio, other.aspect_ratio]
126
124
  end
127
125
  end
128
126
  end
@@ -2,12 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
 
5
- class FastpixClient::Models::Components::GetMediaResponse
5
+ class FastpixClient::Models::Components::GetMediaDetailResponse
6
6
  extend ::Crystalline::MetadataFields::ClassMethods
7
7
  end
8
8
 
9
9
 
10
- class FastpixClient::Models::Components::GetMediaResponse
10
+ class FastpixClient::Models::Components::GetMediaDetailResponse
11
11
  def id(); end
12
12
  def id=(str_); end
13
13
  def source_media_id(); end
@@ -37,7 +37,7 @@ class FastpixClient::Models::Components::GetMediaResponse
37
37
  def moderation(); end
38
38
  def moderation=(str_); end
39
39
  def duration(); end
40
- def duration=(str_); end
40
+ def duration=(float_); end
41
41
  def frame_rate(); end
42
42
  def frame_rate=(str_); end
43
43
  def created_at(); end
@@ -62,6 +62,8 @@ class FastpixClient::Models::Components::GetMediaResponse
62
62
  def is_audio_only=(str_); end
63
63
  def subtitle_available(); end
64
64
  def subtitle_available=(str_); end
65
+ def optimize_audio(); end
66
+ def optimize_audio=(str_); end
65
67
  def aspect_ratio(); end
66
68
  def aspect_ratio=(str_); end
67
69
  end
@@ -7,8 +7,8 @@
7
7
  module FastpixClient
8
8
  module Models
9
9
  module Components
10
- # GetMediaResponseMaxResolution - The maximum resolution specified by the user for the media.
11
- class GetMediaResponseMaxResolution < T::Enum
10
+ # GetMediaDetailResponseMaxResolution - The maximum resolution specified by the user for the media.
11
+ class GetMediaDetailResponseMaxResolution < T::Enum
12
12
 
13
13
 
14
14
  enums do
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class FastpixClient::Models::Components::GetMediaDetailResponseMaxResolution
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class FastpixClient::Models::Components::GetMediaDetailResponseMaxResolution
11
+ end
@@ -7,8 +7,8 @@
7
7
  module FastpixClient
8
8
  module Models
9
9
  module Components
10
- # GetMediaResponseMediaQuality - The quality tier applied to the media.
11
- class GetMediaResponseMediaQuality < T::Enum
10
+ # GetMediaDetailResponseMediaQuality - The quality tier applied to the media.
11
+ class GetMediaDetailResponseMediaQuality < T::Enum
12
12
 
13
13
 
14
14
  enums do
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class FastpixClient::Models::Components::GetMediaDetailResponseMediaQuality
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class FastpixClient::Models::Components::GetMediaDetailResponseMediaQuality
11
+ end
@@ -0,0 +1,48 @@
1
+ # Generated code for FastPix API SDK.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module FastpixClient
8
+ module Models
9
+ module Components
10
+ # GetMediaDetailResponseMp4Support - One MP4 rendition generated for the media when MP4 support is requested.
11
+ class GetMediaDetailResponseMp4Support
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # The MP4 rendition type. `capped_4k` is a downloadable MP4 video capped at 4K resolution, `audioOnly` is a downloadable m4a audio-only file.
16
+ field :type, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('type') } }
17
+ # Generation status of this MP4 rendition. One of `preparing`, `ready`, or `failed`.
18
+ field :status, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('status') } }
19
+ # Pixel height of the rendition. Omitted for the `audioOnly` type.
20
+ field :height, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('height') } }
21
+ # Pixel width of the rendition. Omitted for the `audioOnly` type.
22
+ field :width, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('width') } }
23
+ # File extension of the downloadable rendition. One of `mp4` or `m4a`.
24
+ field :ext, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('ext') } }
25
+
26
+ sig { params(type: T.nilable(::String), status: T.nilable(::String), height: T.nilable(::Integer), width: T.nilable(::Integer), ext: T.nilable(::String)).void }
27
+ def initialize(type: nil, status: nil, height: nil, width: nil, ext: nil)
28
+ @type = type
29
+ @status = status
30
+ @height = height
31
+ @width = width
32
+ @ext = ext
33
+ end
34
+
35
+ sig { params(other: T.untyped).returns(T::Boolean) }
36
+ def ==(other)
37
+ return false unless other.is_a? self.class
38
+ return false unless @type == other.type
39
+ return false unless @status == other.status
40
+ return false unless @height == other.height
41
+ return false unless @width == other.width
42
+ return false unless @ext == other.ext
43
+ true
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,21 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class FastpixClient::Models::Components::GetMediaDetailResponseMp4Support
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class FastpixClient::Models::Components::GetMediaDetailResponseMp4Support
11
+ def type(); end
12
+ def type=(str_); end
13
+ def status(); end
14
+ def status=(str_); end
15
+ def height(); end
16
+ def height=(str_); end
17
+ def width(); end
18
+ def width=(str_); end
19
+ def ext(); end
20
+ def ext=(str_); end
21
+ end
@@ -7,8 +7,8 @@
7
7
  module FastpixClient
8
8
  module Models
9
9
  module Components
10
- # GetMediaResponseSourceResolution - The actual resolution of the uploaded media. This represents the native quality of the source media.
11
- class GetMediaResponseSourceResolution < T::Enum
10
+ # GetMediaDetailResponseSourceResolution - The actual resolution of the uploaded media. This represents the native quality of the source media.
11
+ class GetMediaDetailResponseSourceResolution < T::Enum
12
12
 
13
13
 
14
14
  enums do
@@ -22,6 +22,8 @@ module FastpixClient
22
22
  SEVEN_HUNDRED_AND_TWENTY = new('720')
23
23
  FOUR_HUNDRED_AND_EIGHTYP = new('480p')
24
24
  FOUR_HUNDRED_AND_EIGHTY = new('480')
25
+ THREE_HUNDRED_AND_SIXTYP = new('360p')
26
+ THREE_HUNDRED_AND_SIXTY = new('360')
25
27
  end
26
28
  end
27
29
  end
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class FastpixClient::Models::Components::GetMediaDetailResponseSourceResolution
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class FastpixClient::Models::Components::GetMediaDetailResponseSourceResolution
11
+ end
@@ -7,8 +7,8 @@
7
7
  module FastpixClient
8
8
  module Models
9
9
  module Components
10
- # GetMediaResponseStatus - Determines the media's status, which can be one of the possible values.
11
- class GetMediaResponseStatus < T::Enum
10
+ # GetMediaDetailResponseStatus - Determines the media's status, which can be one of the possible values.
11
+ class GetMediaDetailResponseStatus < T::Enum
12
12
 
13
13
 
14
14
  enums do
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class FastpixClient::Models::Components::GetMediaDetailResponseStatus
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class FastpixClient::Models::Components::GetMediaDetailResponseStatus
11
+ end
@@ -8,7 +8,7 @@ module FastpixClient
8
8
  module Models
9
9
  module Components
10
10
 
11
- class GetMediaResponseTrack
11
+ class GetMediaDetailResponseTrack
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class FastpixClient::Models::Components::GetMediaDetailResponseTrack
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class FastpixClient::Models::Components::GetMediaDetailResponseTrack
11
+ end
@@ -19,6 +19,9 @@ module FastpixClient
19
19
  # Enables DVR (Digital Video Recorder) functionality, allowing viewers to pause, rewind, and resume live playback.
20
20
  #
21
21
  field :enable_dvr_mode, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('enableDvrMode') } }
22
+ # Controls whether the livestream is recorded to a VOD asset (Live-to-VOD). When true (default), FastPix records and stores the livestream for on-demand viewing. When false, the livestream is not recorded.
23
+ #
24
+ field :enable_recording, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('enableRecording') } }
22
25
  # Defines the maximum resolution for encoding, storage, and playback of the live stream.
23
26
  #
24
27
  field :max_resolution, Crystalline::Nilable.new(Models::Components::CreateLiveStreamRequestMaxResolution), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('maxResolution'), 'decoder': Utils.enum_from_string(Models::Components::CreateLiveStreamRequestMaxResolution, true) } }
@@ -28,10 +31,11 @@ module FastpixClient
28
31
  # Basic access policy for media content
29
32
  field :media_policy, Crystalline::Nilable.new(Models::Components::BasicAccessPolicy), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mediaPolicy'), 'decoder': Utils.enum_from_string(Models::Components::BasicAccessPolicy, true) } }
30
33
 
31
- sig { params(metadata: T.nilable(T::Hash[Symbol, ::String]), enable_dvr_mode: T.nilable(T::Boolean), max_resolution: T.nilable(Models::Components::CreateLiveStreamRequestMaxResolution), reconnect_window: T.nilable(::Integer), media_policy: T.nilable(Models::Components::BasicAccessPolicy)).void }
32
- def initialize(metadata: nil, enable_dvr_mode: nil, max_resolution: Models::Components::CreateLiveStreamRequestMaxResolution::ONE_THOUSAND_AND_EIGHTYP, reconnect_window: 60, media_policy: Models::Components::BasicAccessPolicy::PUBLIC)
34
+ sig { params(metadata: T.nilable(T::Hash[Symbol, ::String]), enable_dvr_mode: T.nilable(T::Boolean), enable_recording: T.nilable(T::Boolean), max_resolution: T.nilable(Models::Components::CreateLiveStreamRequestMaxResolution), reconnect_window: T.nilable(::Integer), media_policy: T.nilable(Models::Components::BasicAccessPolicy)).void }
35
+ def initialize(metadata: nil, enable_dvr_mode: nil, enable_recording: true, max_resolution: Models::Components::CreateLiveStreamRequestMaxResolution::ONE_THOUSAND_AND_EIGHTYP, reconnect_window: 60, media_policy: Models::Components::BasicAccessPolicy::PUBLIC)
33
36
  @metadata = metadata
34
37
  @enable_dvr_mode = enable_dvr_mode
38
+ @enable_recording = enable_recording
35
39
  @max_resolution = max_resolution
36
40
  @reconnect_window = reconnect_window
37
41
  @media_policy = media_policy
@@ -42,6 +46,7 @@ module FastpixClient
42
46
  return false unless other.is_a? self.class
43
47
  return false unless @metadata == other.metadata
44
48
  return false unless @enable_dvr_mode == other.enable_dvr_mode
49
+ return false unless @enable_recording == other.enable_recording
45
50
  return false unless @max_resolution == other.max_resolution
46
51
  return false unless @reconnect_window == other.reconnect_window
47
52
  return false unless @media_policy == other.media_policy
@@ -12,6 +12,8 @@ class FastpixClient::Models::Components::InputMediaSettings
12
12
  def metadata=(str_); end
13
13
  def enable_dvr_mode(); end
14
14
  def enable_dvr_mode=(str_); end
15
+ def enable_recording(); end
16
+ def enable_recording=(str_); end
15
17
  def max_resolution(); end
16
18
  def max_resolution=(str_); end
17
19
  def reconnect_window(); end
@@ -28,15 +28,10 @@ module FastpixClient
28
28
  field :playback_ids, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::PlaybackId)), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('playbackIds') } }
29
29
  # A media consists of different media tracks, like video, audio, and subtitle, all combined.
30
30
  field :tracks, Crystalline::Nilable.new(Crystalline::Array.new(Crystalline::Union.new(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack))), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('tracks') } }
31
- # Determines the type of MP4 support for the media.
32
- # - **none**: Disables MP4 support.
33
- # - **capped_4k**: Enables MP4 downloads with resolutions up to 4K.
34
- # - **audioOnly**: Provides an MP4 stream containing only the audio.
35
- # - **audioOnly,capped_4k**: Enables both MP4 video downloads (up to 4K) and an audio-only stream.
36
- #
37
- field :mp4_support, Crystalline::Nilable.new(Models::Components::LiveMediaClipsMp4Support), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mp4Support'), 'decoder': Utils.enum_from_string(Models::Components::LiveMediaClipsMp4Support, true) } }
38
- # The length of the media in seconds, with a maximum allowed duration of 12 hours per individual media.
39
- field :duration, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('duration') } }
31
+ # The MP4 renditions generated for the media. Present only when MP4 support is enabled.
32
+ field :mp4_support, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::LiveMediaClipsMp4Support)), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mp4Support') } }
33
+ # Duration of the media in seconds.
34
+ field :duration, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('duration') } }
40
35
  # Time the media was created, defined as a localDateTime (UTC Time).
41
36
  field :created_at, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('createdAt'), 'decoder': Utils.datetime_from_iso_format(true) } }
42
37
  # Time the media was updated, defined as a localDateTime (UTC Time).
@@ -55,11 +50,13 @@ module FastpixClient
55
50
  field :is_audio_only, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('isAudioOnly') } }
56
51
  # Indicates whether subtitles are available for the media.
57
52
  field :subtitle_available, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('subtitleAvailable') } }
53
+ # Whether the audio track of the media has been volume-normalized.
54
+ field :optimize_audio, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('optimizeAudio') } }
58
55
  # The aspect ratio of a video is a value that describes the relative shape of a video based on its width and height.
59
56
  field :aspect_ratio, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('aspectRatio') } }
60
57
 
61
- sig { params(id: T.nilable(::String), workspace_id: T.nilable(::String), stream_id: T.nilable(::String), creator_id: T.nilable(::String), status: T.nilable(Models::Components::LiveMediaClipsStatus), source_access: T.nilable(T::Boolean), playback_ids: T.nilable(T::Array[Models::Components::PlaybackId]), tracks: T.nilable(T::Array[T.any(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack)]), mp4_support: T.nilable(Models::Components::LiveMediaClipsMp4Support), duration: T.nilable(::String), created_at: T.nilable(::DateTime), updated_at: T.nilable(::DateTime), thumbnail: T.nilable(::String), title: T.nilable(::String), max_resolution: T.nilable(Models::Components::LiveMediaClipsMaxResolution), source_resolution: T.nilable(Models::Components::LiveMediaClipsSourceResolution), generated_subtitles: T.nilable(T::Array[Models::Components::TracksSubtitles]), is_audio_only: T.nilable(T::Boolean), subtitle_available: T.nilable(T::Boolean), aspect_ratio: T.nilable(::String)).void }
62
- def initialize(id: nil, workspace_id: nil, stream_id: nil, creator_id: nil, status: nil, source_access: nil, playback_ids: nil, tracks: nil, mp4_support: nil, duration: nil, created_at: nil, updated_at: nil, thumbnail: nil, title: nil, max_resolution: Models::Components::LiveMediaClipsMaxResolution::ONE_THOUSAND_AND_EIGHTYP, source_resolution: Models::Components::LiveMediaClipsSourceResolution::ONE_THOUSAND_AND_EIGHTYP, generated_subtitles: nil, is_audio_only: nil, subtitle_available: nil, aspect_ratio: nil)
58
+ sig { params(id: T.nilable(::String), workspace_id: T.nilable(::String), stream_id: T.nilable(::String), creator_id: T.nilable(::String), status: T.nilable(Models::Components::LiveMediaClipsStatus), source_access: T.nilable(T::Boolean), playback_ids: T.nilable(T::Array[Models::Components::PlaybackId]), tracks: T.nilable(T::Array[T.any(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack)]), mp4_support: T.nilable(T::Array[Models::Components::LiveMediaClipsMp4Support]), duration: T.nilable(::Float), created_at: T.nilable(::DateTime), updated_at: T.nilable(::DateTime), thumbnail: T.nilable(::String), title: T.nilable(::String), max_resolution: T.nilable(Models::Components::LiveMediaClipsMaxResolution), source_resolution: T.nilable(Models::Components::LiveMediaClipsSourceResolution), generated_subtitles: T.nilable(T::Array[Models::Components::TracksSubtitles]), is_audio_only: T.nilable(T::Boolean), subtitle_available: T.nilable(T::Boolean), optimize_audio: T.nilable(T::Boolean), aspect_ratio: T.nilable(::String)).void }
59
+ def initialize(id: nil, workspace_id: nil, stream_id: nil, creator_id: nil, status: nil, source_access: nil, playback_ids: nil, tracks: nil, mp4_support: nil, duration: nil, created_at: nil, updated_at: nil, thumbnail: nil, title: nil, max_resolution: Models::Components::LiveMediaClipsMaxResolution::ONE_THOUSAND_AND_EIGHTYP, source_resolution: Models::Components::LiveMediaClipsSourceResolution::ONE_THOUSAND_AND_EIGHTYP, generated_subtitles: nil, is_audio_only: nil, subtitle_available: nil, optimize_audio: nil, aspect_ratio: nil)
63
60
  @id = id
64
61
  @workspace_id = workspace_id
65
62
  @stream_id = stream_id
@@ -79,6 +76,7 @@ module FastpixClient
79
76
  @generated_subtitles = generated_subtitles
80
77
  @is_audio_only = is_audio_only
81
78
  @subtitle_available = subtitle_available
79
+ @optimize_audio = optimize_audio
82
80
  @aspect_ratio = aspect_ratio
83
81
  end
84
82
 
@@ -89,11 +87,11 @@ module FastpixClient
89
87
  [@id, @workspace_id, @stream_id, @creator_id, @status,
90
88
  @source_access, @playback_ids, @tracks, @mp4_support, @duration,
91
89
  @created_at, @updated_at, @thumbnail, @title, @max_resolution,
92
- @source_resolution, @generated_subtitles, @is_audio_only, @subtitle_available, @aspect_ratio] ==
90
+ @source_resolution, @generated_subtitles, @is_audio_only, @subtitle_available, @optimize_audio, @aspect_ratio] ==
93
91
  [other.id, other.workspace_id, other.stream_id, other.creator_id, other.status,
94
92
  other.source_access, other.playback_ids, other.tracks, other.mp4_support, other.duration,
95
93
  other.created_at, other.updated_at, other.thumbnail, other.title, other.max_resolution,
96
- other.source_resolution, other.generated_subtitles, other.is_audio_only, other.subtitle_available, other.aspect_ratio]
94
+ other.source_resolution, other.generated_subtitles, other.is_audio_only, other.subtitle_available, other.optimize_audio, other.aspect_ratio]
97
95
  end
98
96
  end
99
97
  end
@@ -27,7 +27,7 @@ class FastpixClient::Models::Components::LiveMediaClips
27
27
  def mp4_support(); end
28
28
  def mp4_support=(str_); end
29
29
  def duration(); end
30
- def duration=(str_); end
30
+ def duration=(float_); end
31
31
  def created_at(); end
32
32
  def created_at=(str_); end
33
33
  def updated_at(); end
@@ -46,6 +46,8 @@ class FastpixClient::Models::Components::LiveMediaClips
46
46
  def is_audio_only=(str_); end
47
47
  def subtitle_available(); end
48
48
  def subtitle_available=(str_); end
49
+ def optimize_audio(); end
50
+ def optimize_audio=(str_); end
49
51
  def aspect_ratio(); end
50
52
  def aspect_ratio=(str_); end
51
53
  end
@@ -7,20 +7,40 @@
7
7
  module FastpixClient
8
8
  module Models
9
9
  module Components
10
- # LiveMediaClipsMp4Support - Determines the type of MP4 support for the media.
11
- # - **none**: Disables MP4 support.
12
- # - **capped_4k**: Enables MP4 downloads with resolutions up to 4K.
13
- # - **audioOnly**: Provides an MP4 stream containing only the audio.
14
- # - **audioOnly,capped_4k**: Enables both MP4 video downloads (up to 4K) and an audio-only stream.
15
- #
16
- class LiveMediaClipsMp4Support < T::Enum
10
+ # LiveMediaClipsMp4Support - One MP4 rendition generated for the media when MP4 support is requested.
11
+ class LiveMediaClipsMp4Support
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
17
14
 
15
+ # The MP4 rendition type. `capped_4k` is a downloadable MP4 video capped at 4K resolution, `audioOnly` is a downloadable m4a audio-only file.
16
+ field :type, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('type') } }
17
+ # Generation status of this MP4 rendition. One of `preparing`, `ready`, or `failed`.
18
+ field :status, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('status') } }
19
+ # Pixel height of the rendition. Omitted for the `audioOnly` type.
20
+ field :height, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('height') } }
21
+ # Pixel width of the rendition. Omitted for the `audioOnly` type.
22
+ field :width, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('width') } }
23
+ # File extension of the downloadable rendition. One of `mp4` or `m4a`.
24
+ field :ext, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('ext') } }
18
25
 
19
- enums do
20
- NONE = new('none')
21
- CAPPED_4K = new('capped_4k')
22
- AUDIO_ONLY = new('audioOnly')
23
- AUDIO_ONLY_CAPPED_4K = new('audioOnly,capped_4k')
26
+ sig { params(type: T.nilable(::String), status: T.nilable(::String), height: T.nilable(::Integer), width: T.nilable(::Integer), ext: T.nilable(::String)).void }
27
+ def initialize(type: nil, status: nil, height: nil, width: nil, ext: nil)
28
+ @type = type
29
+ @status = status
30
+ @height = height
31
+ @width = width
32
+ @ext = ext
33
+ end
34
+
35
+ sig { params(other: T.untyped).returns(T::Boolean) }
36
+ def ==(other)
37
+ return false unless other.is_a? self.class
38
+ return false unless @type == other.type
39
+ return false unless @status == other.status
40
+ return false unless @height == other.height
41
+ return false unless @width == other.width
42
+ return false unless @ext == other.ext
43
+ true
24
44
  end
25
45
  end
26
46
  end
@@ -8,4 +8,14 @@ end
8
8
 
9
9
 
10
10
  class FastpixClient::Models::Components::LiveMediaClipsMp4Support
11
- end
11
+ def type(); end
12
+ def type=(str_); end
13
+ def status(); end
14
+ def status=(str_); end
15
+ def height(); end
16
+ def height=(str_); end
17
+ def width(); end
18
+ def width=(str_); end
19
+ def ext(); end
20
+ def ext=(str_); end
21
+ end
@@ -22,6 +22,8 @@ module FastpixClient
22
22
  SEVEN_HUNDRED_AND_TWENTY = new('720')
23
23
  FOUR_HUNDRED_AND_EIGHTYP = new('480p')
24
24
  FOUR_HUNDRED_AND_EIGHTY = new('480')
25
+ THREE_HUNDRED_AND_SIXTYP = new('360p')
26
+ THREE_HUNDRED_AND_SIXTY = new('360')
25
27
  end
26
28
  end
27
29
  end
@@ -22,13 +22,8 @@ module FastpixClient
22
22
  field :creator_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('creatorId') } }
23
23
  # Determines the media’s status, which can be one of the possible values.
24
24
  field :status, Crystalline::Nilable.new(Models::Components::MediaStatus), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Components::MediaStatus, true) } }
25
- # Determines the type of MP4 support for the media.
26
- # - **none**: Disables MP4 support.
27
- # - **capped_4k**: Enables MP4 downloads with resolutions up to 4K.
28
- # - **audioOnly**: Provides an MP4 stream containing only the audio.
29
- # - **audioOnly,capped_4k**: Enables both MP4 video downloads (up to 4K) and an audio-only stream.
30
- #
31
- field :mp4_support, Crystalline::Nilable.new(Models::Components::MediaMp4Support), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mp4Support'), 'decoder': Utils.enum_from_string(Models::Components::MediaMp4Support, true) } }
25
+ # The MP4 renditions generated for the media. Present only when MP4 support is enabled.
26
+ field :mp4_support, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::MediaMp4Support)), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('mp4Support') } }
32
27
  # A collection of Playback ID objects utilized for crafting HLS playback URLs.
33
28
  field :playback_ids, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::PlaybackId)), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('playbackIds') } }
34
29
  # A media consists of different media tracks, like video, audio, and subtitle, all combined.
@@ -41,8 +36,8 @@ module FastpixClient
41
36
  field :named_entities, Crystalline::Nilable.new(Models::Components::AiResponseRecord), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('namedEntities') } }
42
37
  # Represents an AI response record containing status and data for AI-generated features like summary, chapters, named entities, or moderation.
43
38
  field :moderation, Crystalline::Nilable.new(Models::Components::AiResponseRecord), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('moderation') } }
44
- # The length of the media in seconds, with a maximum allowed duration of 12 hours per individual media.
45
- field :duration, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('duration') } }
39
+ # Duration of the media in seconds.
40
+ field :duration, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('duration') } }
46
41
  # Time the media was created, defined as a localDateTime (UTC Time).
47
42
  field :created_at, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('createdAt'), 'decoder': Utils.datetime_from_iso_format(true) } }
48
43
  # Time the media was updated, defined as a localDateTime (UTC Time).
@@ -66,11 +61,13 @@ module FastpixClient
66
61
  field :is_audio_only, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('isAudioOnly') } }
67
62
  # Indicates whether subtitles are available for the media.
68
63
  field :subtitle_available, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('subtitleAvailable') } }
64
+ # Enhance the quality and volume of the audio track. This is available for pre-recorded content only.
65
+ field :optimize_audio, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('optimizeAudio') } }
69
66
  # The aspect ratio of a video is a value that describes the relative shape of a video based on its width and height.
70
67
  field :aspect_ratio, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::FastpixClient::Utils.field_name('aspectRatio') } }
71
68
 
72
- sig { params(id: T.nilable(::String), workspace_id: T.nilable(::String), media_quality: T.nilable(Models::Components::MediaMediaQuality), creator_id: T.nilable(::String), status: T.nilable(Models::Components::MediaStatus), mp4_support: T.nilable(Models::Components::MediaMp4Support), playback_ids: T.nilable(T::Array[Models::Components::PlaybackId]), tracks: T.nilable(T::Array[T.any(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack)]), summary: T.nilable(Models::Components::AiSummaryRecord), chapters: T.nilable(Models::Components::AiResponseRecord), named_entities: T.nilable(Models::Components::AiResponseRecord), moderation: T.nilable(Models::Components::AiResponseRecord), duration: T.nilable(::String), created_at: T.nilable(::DateTime), updated_at: T.nilable(::DateTime), thumbnail: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), title: T.nilable(::String), max_resolution: T.nilable(Models::Components::MediaMaxResolution), source_resolution: T.nilable(Models::Components::MediaSourceResolution), source_access: T.nilable(T::Boolean), generated_subtitles: T.nilable(T::Array[Models::Components::TracksSubtitles]), is_audio_only: T.nilable(T::Boolean), subtitle_available: T.nilable(T::Boolean), aspect_ratio: T.nilable(::String)).void }
73
- def initialize(id: nil, workspace_id: nil, media_quality: nil, creator_id: nil, status: nil, mp4_support: nil, playback_ids: nil, tracks: nil, summary: nil, chapters: nil, named_entities: nil, moderation: nil, duration: nil, created_at: nil, updated_at: nil, thumbnail: nil, metadata: nil, title: nil, max_resolution: Models::Components::MediaMaxResolution::ONE_THOUSAND_AND_EIGHTYP, source_resolution: Models::Components::MediaSourceResolution::ONE_THOUSAND_AND_EIGHTYP, source_access: nil, generated_subtitles: nil, is_audio_only: nil, subtitle_available: nil, aspect_ratio: nil)
69
+ sig { params(id: T.nilable(::String), workspace_id: T.nilable(::String), media_quality: T.nilable(Models::Components::MediaMediaQuality), creator_id: T.nilable(::String), status: T.nilable(Models::Components::MediaStatus), mp4_support: T.nilable(T::Array[Models::Components::MediaMp4Support]), playback_ids: T.nilable(T::Array[Models::Components::PlaybackId]), tracks: T.nilable(T::Array[T.any(Models::Components::VideoTrack, Models::Components::AudioTrack, Models::Components::SubtitleTrack)]), summary: T.nilable(Models::Components::AiSummaryRecord), chapters: T.nilable(Models::Components::AiResponseRecord), named_entities: T.nilable(Models::Components::AiResponseRecord), moderation: T.nilable(Models::Components::AiResponseRecord), duration: T.nilable(::Float), created_at: T.nilable(::DateTime), updated_at: T.nilable(::DateTime), thumbnail: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), title: T.nilable(::String), max_resolution: T.nilable(Models::Components::MediaMaxResolution), source_resolution: T.nilable(Models::Components::MediaSourceResolution), source_access: T.nilable(T::Boolean), generated_subtitles: T.nilable(T::Array[Models::Components::TracksSubtitles]), is_audio_only: T.nilable(T::Boolean), subtitle_available: T.nilable(T::Boolean), optimize_audio: T.nilable(T::Boolean), aspect_ratio: T.nilable(::String)).void }
70
+ def initialize(id: nil, workspace_id: nil, media_quality: nil, creator_id: nil, status: nil, mp4_support: nil, playback_ids: nil, tracks: nil, summary: nil, chapters: nil, named_entities: nil, moderation: nil, duration: nil, created_at: nil, updated_at: nil, thumbnail: nil, metadata: nil, title: nil, max_resolution: Models::Components::MediaMaxResolution::ONE_THOUSAND_AND_EIGHTYP, source_resolution: Models::Components::MediaSourceResolution::ONE_THOUSAND_AND_EIGHTYP, source_access: nil, generated_subtitles: nil, is_audio_only: nil, subtitle_available: nil, optimize_audio: nil, aspect_ratio: nil)
74
71
  @id = id
75
72
  @workspace_id = workspace_id
76
73
  @media_quality = media_quality
@@ -95,6 +92,7 @@ module FastpixClient
95
92
  @generated_subtitles = generated_subtitles
96
93
  @is_audio_only = is_audio_only
97
94
  @subtitle_available = subtitle_available
95
+ @optimize_audio = optimize_audio
98
96
  @aspect_ratio = aspect_ratio
99
97
  end
100
98
 
@@ -106,12 +104,12 @@ module FastpixClient
106
104
  @mp4_support, @playback_ids, @tracks, @summary, @chapters,
107
105
  @named_entities, @moderation, @duration, @created_at, @updated_at,
108
106
  @thumbnail, @metadata, @title, @max_resolution, @source_resolution,
109
- @source_access, @generated_subtitles, @is_audio_only, @subtitle_available, @aspect_ratio] ==
107
+ @source_access, @generated_subtitles, @is_audio_only, @subtitle_available, @optimize_audio, @aspect_ratio] ==
110
108
  [other.id, other.workspace_id, other.media_quality, other.creator_id, other.status,
111
109
  other.mp4_support, other.playback_ids, other.tracks, other.summary, other.chapters,
112
110
  other.named_entities, other.moderation, other.duration, other.created_at, other.updated_at,
113
111
  other.thumbnail, other.metadata, other.title, other.max_resolution, other.source_resolution,
114
- other.source_access, other.generated_subtitles, other.is_audio_only, other.subtitle_available, other.aspect_ratio]
112
+ other.source_access, other.generated_subtitles, other.is_audio_only, other.subtitle_available, other.optimize_audio, other.aspect_ratio]
115
113
  end
116
114
  end
117
115
  end