mux_ruby 1.8.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/docs/Asset.md +13 -12
  4. data/docs/AssetErrors.md +2 -2
  5. data/docs/AssetNonStandardInputReasons.md +9 -9
  6. data/docs/AssetRecordingTimes.md +2 -2
  7. data/docs/AssetStaticRenditions.md +1 -1
  8. data/docs/AssetsApi.md +4 -0
  9. data/docs/CreateAssetRequest.md +6 -6
  10. data/docs/CreateTrackRequest.md +4 -4
  11. data/docs/GetAssetOrLiveStreamIdResponse.md +8 -0
  12. data/docs/GetAssetOrLiveStreamIdResponseData.md +10 -0
  13. data/docs/GetAssetOrLiveStreamIdResponseDataObject.md +9 -0
  14. data/docs/InputSettings.md +9 -7
  15. data/docs/InputSettingsOverlaySettings.md +7 -7
  16. data/docs/PlaybackID.md +1 -1
  17. data/docs/PlaybackIDApi.md +60 -0
  18. data/docs/Track.md +13 -13
  19. data/examples/video/exercise-assets.rb +21 -0
  20. data/examples/video/exercise-live-streams.rb +8 -0
  21. data/lib/mux_ruby.rb +4 -0
  22. data/lib/mux_ruby/api/assets_api.rb +4 -0
  23. data/lib/mux_ruby/api/playback_id_api.rb +69 -0
  24. data/lib/mux_ruby/api_client.rb +12 -12
  25. data/lib/mux_ruby/models/asset.rb +38 -4
  26. data/lib/mux_ruby/models/asset_errors.rb +2 -0
  27. data/lib/mux_ruby/models/asset_master.rb +35 -0
  28. data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +13 -13
  29. data/lib/mux_ruby/models/asset_recording_times.rb +2 -2
  30. data/lib/mux_ruby/models/asset_static_renditions.rb +2 -2
  31. data/lib/mux_ruby/models/asset_static_renditions_files.rb +2 -2
  32. data/lib/mux_ruby/models/create_asset_request.rb +8 -2
  33. data/lib/mux_ruby/models/create_track_request.rb +6 -2
  34. data/lib/mux_ruby/models/get_asset_or_live_stream_id_response.rb +184 -0
  35. data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data.rb +203 -0
  36. data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data_object.rb +230 -0
  37. data/lib/mux_ruby/models/input_settings.rb +31 -4
  38. data/lib/mux_ruby/models/input_settings_overlay_settings.rb +10 -2
  39. data/lib/mux_ruby/models/playback_id.rb +1 -0
  40. data/lib/mux_ruby/models/simulcast_target.rb +1 -1
  41. data/lib/mux_ruby/models/track.rb +27 -2
  42. data/lib/mux_ruby/models/update_asset_master_access_request.rb +1 -1
  43. data/lib/mux_ruby/models/update_asset_mp4_support_request.rb +1 -1
  44. data/lib/mux_ruby/models/upload.rb +1 -1
  45. data/lib/mux_ruby/version.rb +1 -1
  46. data/mux_ruby.gemspec +2 -0
  47. data/spec/api/assets_api_spec.rb +2 -0
  48. data/spec/api/playback_id_api_spec.rb +40 -0
  49. data/spec/models/asset_master_spec.rb +4 -0
  50. data/spec/models/asset_spec.rb +10 -0
  51. data/spec/models/get_asset_or_live_stream_id_response_data_object_spec.rb +44 -0
  52. data/spec/models/get_asset_or_live_stream_id_response_data_spec.rb +46 -0
  53. data/spec/models/get_asset_or_live_stream_id_response_spec.rb +34 -0
  54. data/spec/models/input_settings_spec.rb +12 -0
  55. data/spec/models/track_spec.rb +4 -0
  56. metadata +106 -89
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 949908e8ddb5270a36db4c9df9991f878e91b8e95ad6a1260506b956861f7ec6
4
- data.tar.gz: 368bcacc1322c6308fce401c068e74a5ae0bd3627e1eb2261db5d30bd53e0fa7
3
+ metadata.gz: 57380e4202d460cfdb8bde993e835818799ea3c1df4f52f3f513eec8d10552cc
4
+ data.tar.gz: 1acb2eeb73ab3c670ca81f6cf3095cc8b4681b20d458e235d969f5f103ef072e
5
5
  SHA512:
6
- metadata.gz: fde803ebf5c4db63c13522a8d4513282d74e1305725f122e87232be2d3126fdd1ff95c931f1e535c8d9d5de227d31924d7163a53cc51791294fb41c9afed78aa
7
- data.tar.gz: 279bdcfeb349d5f4176e0e4408597644053052ef7a3cd85152a6443e50f9c7e6704e8e2dc5d7341814cd37e96b8f9cd8bf3be6fefca36989462eddaa28152f1b
6
+ metadata.gz: 01bc513413c7663ef490a4e193755479e7b0e6739f9f1b7ddd621e8f1146a8ec9a219be4d8b78f2b7f259105b26f203b1da04d7835bc34b718fdef3e759988c2
7
+ data.tar.gz: 20adae366398998ae7861471860cb36579d2e6594620ebd6c8073d3872e326b070d33859e2244c2a0420cf5c71c8483358895cf0daf6013dcd5bf76c3c9df809
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mux_ruby (1.8.1)
4
+ mux_ruby (1.9.0)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -78,4 +78,4 @@ DEPENDENCIES
78
78
  webmock (~> 1.24, >= 1.24.3)
79
79
 
80
80
  BUNDLED WITH
81
- 1.17.2
81
+ 2.2.13
data/docs/Asset.md CHANGED
@@ -3,28 +3,29 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **id** | **String** | | [optional]
7
- **created_at** | **String** | | [optional]
6
+ **id** | **String** | Unique identifier for the Asset. | [optional]
7
+ **created_at** | **String** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional]
8
8
  **deleted_at** | **String** | | [optional]
9
- **status** | **String** | | [optional]
10
- **duration** | **Float** | | [optional]
11
- **max_stored_resolution** | **String** | | [optional]
12
- **max_stored_frame_rate** | **Float** | | [optional]
13
- **aspect_ratio** | **String** | | [optional]
9
+ **status** | **String** | The status of the asset. | [optional]
10
+ **duration** | **Float** | The duration of the asset in seconds (max duration for a single asset is 24 hours). | [optional]
11
+ **max_stored_resolution** | **String** | The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. | [optional]
12
+ **max_stored_frame_rate** | **Float** | The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. | [optional]
13
+ **aspect_ratio** | **String** | The aspect ratio of the asset in the form of `width:height`, for example `16:9`. | [optional]
14
14
  **playback_ids** | [**Array<PlaybackID>**](PlaybackID.md) | | [optional]
15
15
  **tracks** | [**Array<Track>**](Track.md) | | [optional]
16
16
  **errors** | [**AssetErrors**](AssetErrors.md) | | [optional]
17
17
  **per_title_encode** | **BOOLEAN** | | [optional]
18
- **is_live** | **BOOLEAN** | | [optional]
19
- **passthrough** | **String** | | [optional]
20
- **live_stream_id** | **String** | | [optional]
18
+ **is_live** | **BOOLEAN** | Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state. | [optional]
19
+ **passthrough** | **String** | Arbitrary metadata set for the asset. Max 255 characters. | [optional]
20
+ **live_stream_id** | **String** | Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. | [optional]
21
21
  **master** | [**AssetMaster**](AssetMaster.md) | | [optional]
22
22
  **master_access** | **String** | | [optional] [default to 'none']
23
23
  **mp4_support** | **String** | | [optional] [default to 'none']
24
- **normalize_audio** | **BOOLEAN** | | [optional] [default to false]
24
+ **source_asset_id** | **String** | Asset Identifier of the video used as the source for creating the clip. | [optional]
25
+ **normalize_audio** | **BOOLEAN** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false]
25
26
  **static_renditions** | [**AssetStaticRenditions**](AssetStaticRenditions.md) | | [optional]
26
27
  **recording_times** | [**Array<AssetRecordingTimes>**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream | [optional]
27
28
  **non_standard_input_reasons** | [**AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional]
28
- **test** | **BOOLEAN** | | [optional]
29
+ **test** | **BOOLEAN** | Indicates this asset is a test asset if the value is `true`. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional]
29
30
 
30
31
 
data/docs/AssetErrors.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **type** | **String** | | [optional]
7
- **messages** | **Array<String>** | | [optional]
6
+ **type** | **String** | The type of error that occurred for this asset. | [optional]
7
+ **messages** | **Array<String>** | Error messages with more details. | [optional]
8
8
 
9
9
 
@@ -3,14 +3,14 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **video_codec** | **String** | The video codec used on the input file | [optional]
7
- **audio_codec** | **String** | The audio codec used on the input file | [optional]
8
- **video_gop_size** | **String** | The video key frame Interval (also called as Group of Picture or GOP) of the input file | [optional]
9
- **video_frame_rate** | **String** | The video frame rate of the input file | [optional]
10
- **video_resolution** | **String** | The video resolution of the input file | [optional]
11
- **pixel_aspect_ratio** | **String** | The video pixel aspect ratio of the input file | [optional]
12
- **video_edit_list** | **String** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List | [optional]
13
- **audio_edit_list** | **String** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List | [optional]
14
- **unexpected_media_file_parameters** | **String** | A catch-all reason when the input file in created with non-standard encoding parameters | [optional]
6
+ **video_codec** | **String** | The video codec used on the input file. | [optional]
7
+ **audio_codec** | **String** | The audio codec used on the input file. | [optional]
8
+ **video_gop_size** | **String** | The video key frame Interval (also called as Group of Picture or GOP) of the input file. | [optional]
9
+ **video_frame_rate** | **String** | The video frame rate of the input file. | [optional]
10
+ **video_resolution** | **String** | The video resolution of the input file. | [optional]
11
+ **pixel_aspect_ratio** | **String** | The video pixel aspect ratio of the input file. | [optional]
12
+ **video_edit_list** | **String** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List. | [optional]
13
+ **audio_edit_list** | **String** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List. | [optional]
14
+ **unexpected_media_file_parameters** | **String** | A catch-all reason when the input file in created with non-standard encoding parameters. | [optional]
15
15
 
16
16
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **started_at** | **DateTime** | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format | [optional]
7
- **duration** | **Float** | The duration of the live stream recorded. The time value is in seconds | [optional]
6
+ **started_at** | **DateTime** | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format. | [optional]
7
+ **duration** | **Float** | The duration of the live stream recorded. The time value is in seconds. | [optional]
8
8
 
9
9
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **status** | **String** | * `ready`: All MP4s are downloadable * `preparing`: We are preparing the MP4s * `disabled`: MP4 support was not requested or has been removed * `errored`: There was a Mux internal error that prevented the MP4s from being created | [optional] [default to 'disabled']
6
+ **status** | **String** | Indicates the status of downloadable MP4 versions of this asset. | [optional] [default to 'disabled']
7
7
  **files** | [**Array<AssetStaticRenditionsFiles>**](AssetStaticRenditionsFiles.md) | | [optional]
8
8
 
9
9
 
data/docs/AssetsApi.md CHANGED
@@ -176,6 +176,8 @@ Name | Type | Description | Notes
176
176
 
177
177
  Delete an asset
178
178
 
179
+ Deletes a video asset and all its data
180
+
179
181
  ### Example
180
182
  ```ruby
181
183
  # load the gem
@@ -477,6 +479,8 @@ Name | Type | Description | Notes
477
479
 
478
480
  List assets
479
481
 
482
+ List all Mux assets.
483
+
480
484
  ### Example
481
485
  ```ruby
482
486
  # load the gem
@@ -3,13 +3,13 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **input** | [**Array<InputSettings>**](InputSettings.md) | | [optional]
7
- **playback_policy** | [**Array<PlaybackPolicy>**](PlaybackPolicy.md) | | [optional]
6
+ **input** | [**Array<InputSettings>**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional]
7
+ **playback_policy** | [**Array<PlaybackPolicy>**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional]
8
8
  **per_title_encode** | **BOOLEAN** | | [optional]
9
- **passthrough** | **String** | | [optional]
10
- **mp4_support** | **String** | | [optional]
9
+ **passthrough** | **String** | Arbitrary metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional]
10
+ **mp4_support** | **String** | Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. | [optional]
11
11
  **normalize_audio** | **BOOLEAN** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false]
12
- **master_access** | **String** | | [optional]
13
- **test** | **BOOLEAN** | | [optional]
12
+ **master_access** | **String** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. | [optional]
13
+ **test** | **BOOLEAN** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional]
14
14
 
15
15
 
@@ -6,9 +6,9 @@ Name | Type | Description | Notes
6
6
  **url** | **String** | |
7
7
  **type** | **String** | |
8
8
  **text_type** | **String** | |
9
- **language_code** | **String** | |
10
- **name** | **String** | | [optional]
11
- **closed_captions** | **BOOLEAN** | | [optional]
12
- **passthrough** | **String** | | [optional]
9
+ **language_code** | **String** | The language code value must be a valid BCP 47 specification compliant value. For example, en for English or en-US for the US version of English. |
10
+ **name** | **String** | The name of the track containing a human-readable description. This value must be unqiue across all the text type and subtitles text type tracks. HLS manifest will associate subtitle text track with this value. For example, set the value to \"English\" for subtitles text track with language_code as en-US. If this parameter is not included, Mux will auto-populate based on the language_code value. | [optional]
11
+ **closed_captions** | **BOOLEAN** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). | [optional]
12
+ **passthrough** | **String** | Arbitrary metadata set for the track either when creating the asset or track. | [optional]
13
13
 
14
14
 
@@ -0,0 +1,8 @@
1
+ # MuxRuby::GetAssetOrLiveStreamIdResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**GetAssetOrLiveStreamIdResponseData**](GetAssetOrLiveStreamIdResponseData.md) | | [optional]
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # MuxRuby::GetAssetOrLiveStreamIdResponseData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The Playback ID used to retrieve the corresponding asset or the live stream ID | [optional]
7
+ **policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
8
+ **object** | [**GetAssetOrLiveStreamIdResponseDataObject**](GetAssetOrLiveStreamIdResponseDataObject.md) | | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # MuxRuby::GetAssetOrLiveStreamIdResponseDataObject
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The identifier of the object. | [optional]
7
+ **type** | **String** | Identifies the object type associated with the playback ID. | [optional]
8
+
9
+
@@ -3,13 +3,15 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **url** | **String** | | [optional]
6
+ **url** | **String** | The web address of the file that Mux should download and use. * For subtitles text tracks, the url is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the url is the location of the watermark image. * When creating clips from existing Mux assets, the url is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. | [optional]
7
7
  **overlay_settings** | [**InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) | | [optional]
8
- **type** | **String** | | [optional]
9
- **text_type** | **String** | | [optional]
10
- **language_code** | **String** | | [optional]
11
- **name** | **String** | | [optional]
12
- **closed_captions** | **BOOLEAN** | | [optional]
13
- **passthrough** | **String** | | [optional]
8
+ **start_time** | **Float** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. | [optional]
9
+ **end_time** | **Float** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. | [optional]
10
+ **type** | **String** | This parameter is required for the `text` track type. | [optional]
11
+ **text_type** | **String** | Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` track type. | [optional]
12
+ **language_code** | **String** | The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track. | [optional]
13
+ **name** | **String** | The name of the track containing a human-readable description. This value must be unique across all text type and subtitles `text` type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for subtitles text track with language_code as en. This optional parameter should be used only for `text` type and subtitles `text` type track. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value. | [optional]
14
+ **closed_captions** | **BOOLEAN** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional]
15
+ **passthrough** | **String** | This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional]
14
16
 
15
17
 
@@ -3,12 +3,12 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **vertical_align** | **String** | | [optional]
7
- **vertical_margin** | **String** | | [optional]
8
- **horizontal_align** | **String** | | [optional]
9
- **horizontal_margin** | **String** | | [optional]
10
- **width** | **String** | | [optional]
11
- **height** | **String** | | [optional]
12
- **opacity** | **String** | | [optional]
6
+ **vertical_align** | **String** | Where the vertical positioning of the overlay/watermark should begin from. Defaults to `\"top\"` | [optional]
7
+ **vertical_margin** | **String** | The distance from the vertical_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'middle', a positive value will shift the overlay towards the bottom and and a negative value will shift it towards the top. | [optional]
8
+ **horizontal_align** | **String** | Where the horizontal positioning of the overlay/watermark should begin from. | [optional]
9
+ **horizontal_margin** | **String** | The distance from the horizontal_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'center', a positive value will shift the image towards the right and and a negative value will shift it towards the left. | [optional]
10
+ **width** | **String** | How wide the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the width will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If height is supplied with no width, the width will scale proportionally to the height. | [optional]
11
+ **height** | **String** | How tall the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the height will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If width is supplied with no height, the height will scale proportionally to the width. | [optional]
12
+ **opacity** | **String** | How opaque the overlay should appear, expressed as a percent. (Default 100%) | [optional]
13
13
 
14
14
 
data/docs/PlaybackID.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **id** | **String** | | [optional]
6
+ **id** | **String** | Unique identifier for the PlaybackID | [optional]
7
7
  **policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
8
8
 
9
9
 
@@ -0,0 +1,60 @@
1
+ # MuxRuby::PlaybackIDApi
2
+
3
+ All URIs are relative to *https://api.mux.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_asset_or_livestream_id**](PlaybackIDApi.md#get_asset_or_livestream_id) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an Asset or Live Stream ID
8
+
9
+
10
+ # **get_asset_or_livestream_id**
11
+ > GetAssetOrLiveStreamIdResponse get_asset_or_livestream_id(playback_id)
12
+
13
+ Retrieve an Asset or Live Stream ID
14
+
15
+ Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'mux_ruby'
21
+ # setup authorization
22
+ MuxRuby.configure do |config|
23
+ # Configure HTTP basic authorization: accessToken
24
+ config.username = 'YOUR USERNAME'
25
+ config.password = 'YOUR PASSWORD'
26
+ end
27
+
28
+ api_instance = MuxRuby::PlaybackIDApi.new
29
+ playback_id = 'playback_id_example' # String | The live stream's playback ID.
30
+
31
+ begin
32
+ #Retrieve an Asset or Live Stream ID
33
+ result = api_instance.get_asset_or_livestream_id(playback_id)
34
+ p result
35
+ rescue MuxRuby::ApiError => e
36
+ puts "Exception when calling PlaybackIDApi->get_asset_or_livestream_id: #{e}"
37
+ end
38
+ ```
39
+
40
+ ### Parameters
41
+
42
+ Name | Type | Description | Notes
43
+ ------------- | ------------- | ------------- | -------------
44
+ **playback_id** | **String**| The live stream's playback ID. |
45
+
46
+ ### Return type
47
+
48
+ [**GetAssetOrLiveStreamIdResponse**](GetAssetOrLiveStreamIdResponse.md)
49
+
50
+ ### Authorization
51
+
52
+ [accessToken](../README.md#accessToken)
53
+
54
+ ### HTTP request headers
55
+
56
+ - **Content-Type**: Not defined
57
+ - **Accept**: application/json
58
+
59
+
60
+
data/docs/Track.md CHANGED
@@ -3,18 +3,18 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **id** | **String** | | [optional]
7
- **type** | **String** | | [optional]
8
- **duration** | **Float** | | [optional]
9
- **max_width** | **Integer** | | [optional]
10
- **max_height** | **Integer** | | [optional]
11
- **max_frame_rate** | **Float** | | [optional]
12
- **max_channels** | **Integer** | | [optional]
13
- **max_channel_layout** | **String** | | [optional]
14
- **text_type** | **String** | | [optional]
15
- **language_code** | **String** | | [optional]
16
- **name** | **String** | | [optional]
17
- **closed_captions** | **BOOLEAN** | | [optional]
18
- **passthrough** | **String** | | [optional]
6
+ **id** | **String** | Unique identifier for the Track | [optional]
7
+ **type** | **String** | The type of track | [optional]
8
+ **duration** | **Float** | The duration in seconds of the track media. This parameter is not set for the `text` type track. This field is optional and may not be set. The top level `duration` field of an asset will always be set. | [optional]
9
+ **max_width** | **Integer** | The maximum width in pixels available for the track. Only set for the `video` type track. | [optional]
10
+ **max_height** | **Integer** | The maximum height in pixels available for the track. Only set for the `video` type track. | [optional]
11
+ **max_frame_rate** | **Float** | The maximum frame rate available for the track. Only set for the `video` type track. This field may return `-1` if the frame rate of the input cannot be reliably determined. | [optional]
12
+ **max_channels** | **Integer** | The maximum number of audio channels the track supports. Only set for the `audio` type track. | [optional]
13
+ **max_channel_layout** | **String** | Only set for the `audio` type track. | [optional]
14
+ **text_type** | **String** | This parameter is set only for the `text` type track. | [optional]
15
+ **language_code** | **String** | The language code value represents [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is set for `text` type and `subtitles` text type track. | [optional]
16
+ **name** | **String** | The name of the track containing a human-readable description. The hls manifest will associate a subtitle text track with this value. For example, the value is \"English\" for subtitles text track for the `language_code` value of `en-US`. This parameter is set for the `text` type and `subtitles` text type track. | [optional]
17
+ **closed_captions** | **BOOLEAN** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is set for the `text` type and `subtitles` text type track. | [optional]
18
+ **passthrough** | **String** | Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. | [optional]
19
19
 
20
20
 
@@ -13,6 +13,7 @@ end
13
13
 
14
14
  # API Client Initialization
15
15
  assets_api = MuxRuby::AssetsApi.new
16
+ playback_ids_api = MuxRuby::PlaybackIDApi.new
16
17
 
17
18
  # ========== create-asset ==========
18
19
  car = MuxRuby::CreateAssetRequest.new
@@ -52,6 +53,20 @@ end
52
53
  puts "get-asset OK ✅"
53
54
  puts "get-asset-input-info OK ✅"
54
55
 
56
+ # ========== clipping ==========
57
+ clip_request = MuxRuby::CreateAssetRequest.new
58
+ clip_request.input = [
59
+ {
60
+ url: "mux://assets/#{create_response.data.id}",
61
+ start_time: 0.0,
62
+ end_time: 5.0
63
+ }
64
+ ]
65
+ create_clip_response = assets_api.create_asset(clip_request)
66
+ assert create_clip_response != nil
67
+ assert create_clip_response.data.id != nil
68
+ puts "clipping OK ✅"
69
+
55
70
  # ========== create-asset-playback-id ==========
56
71
  cpbr = MuxRuby::CreatePlaybackIDRequest.new
57
72
  cpbr.policy = MuxRuby::PlaybackPolicy::PUBLIC
@@ -67,6 +82,12 @@ assert pb_id.data != nil
67
82
  assert pb_id.data.id == pb_id_c.data.id
68
83
  puts "get-asset-playback-id OK ✅"
69
84
 
85
+ # ========== get-asset-or-livestream-id ==========
86
+ get_playback_id_resp = playback_ids_api.get_asset_or_livestream_id(pb_id.data.id).data
87
+ assert get_playback_id_resp.object.id == create_response.data.id
88
+ assert get_playback_id_resp.object.type == "asset"
89
+ puts "get-asset-or-livestream-id OK ✅"
90
+
70
91
  # ========== update-asset-mp4-support ==========
71
92
  mp4_req = MuxRuby::UpdateAssetMP4SupportRequest.new
72
93
  mp4_req.mp4_support = 'standard'
@@ -13,6 +13,7 @@ end
13
13
 
14
14
  # API Client Initialization
15
15
  live_api = MuxRuby::LiveStreamsApi.new
16
+ playback_ids_api = MuxRuby::PlaybackIDApi.new
16
17
 
17
18
  # ========== create-live-stream ==========
18
19
  create_asset_request = MuxRuby::CreateAssetRequest.new
@@ -41,6 +42,13 @@ assert stream_get.data != nil
41
42
  assert stream_get.data.id == stream.data.id
42
43
  puts "get-live-stream OK ✅"
43
44
 
45
+ # ========== get-asset-or-livestream-id ==========
46
+ playback_id = stream.data.playback_ids.first.id
47
+ get_playback_id_resp = playback_ids_api.get_asset_or_livestream_id(playback_id).data
48
+ assert get_playback_id_resp.object.id == stream.data.id
49
+ assert get_playback_id_resp.object.type == "live_stream"
50
+ puts "get-asset-or-livestream-id OK ✅"
51
+
44
52
  # ========== create-live-stream-simulcast-target ==========
45
53
  create_simulcast_target = MuxRuby::CreateSimulcastTargetRequest.new
46
54
  create_simulcast_target.passthrough = 'foo'
data/lib/mux_ruby.rb CHANGED
@@ -35,6 +35,9 @@ require 'mux_ruby/models/enable_live_stream_response'
35
35
  require 'mux_ruby/models/error'
36
36
  require 'mux_ruby/models/filter_value'
37
37
  require 'mux_ruby/models/get_asset_input_info_response'
38
+ require 'mux_ruby/models/get_asset_or_live_stream_id_response'
39
+ require 'mux_ruby/models/get_asset_or_live_stream_id_response_data'
40
+ require 'mux_ruby/models/get_asset_or_live_stream_id_response_data_object'
38
41
  require 'mux_ruby/models/get_asset_playback_id_response'
39
42
  require 'mux_ruby/models/get_metric_timeseries_data_response'
40
43
  require 'mux_ruby/models/get_overall_values_response'
@@ -113,6 +116,7 @@ require 'mux_ruby/api/filters_api'
113
116
  require 'mux_ruby/api/incidents_api'
114
117
  require 'mux_ruby/api/live_streams_api'
115
118
  require 'mux_ruby/api/metrics_api'
119
+ require 'mux_ruby/api/playback_id_api'
116
120
  require 'mux_ruby/api/real_time_api'
117
121
  require 'mux_ruby/api/url_signing_keys_api'
118
122
  require 'mux_ruby/api/video_views_api'