Skip to content

Commit 8082cac

Browse files
authored
Regenerate for V7, clean up dependency management, fix issues with direct uploads and video views, and lots more (#66)
* Testing dealing with dependency mess once and for all * Restructure workflow * What was checkout location * Yeh that doesnt exist * Throwing all of this on a branch so I can see it go through CI * lfg? * Remove some debug logging * Regenerate with proposed fixme removal * Regenerate with latest openapi overhaul * Bump everything to V7 * Improve MP4 tests, but leave them commented out * Skip the right test
1 parent 5534e97 commit 8082cac

28 files changed

+165
-189
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,19 @@ on:
44
push:
55
branches:
66
- master
7-
pull_request:
8-
9-
# I appreciate this isn't the cleanest workflow, but it's the neatest I can get it while we're
10-
# still using dep to manage dependencies. If we move to go modules this can be cleaned up a lot.
11-
# I'd love to use a nicer checkout path, but GitHub actions won't let you use anything above
12-
# /home/runner/work/mux-go/mux-go/, so /home/runner/work/mux-go/mux-go/go it is!
7+
pull_request:
138

149
jobs:
1510
build:
1611
name: Integration Test
1712
runs-on: ubuntu-latest
18-
env:
19-
GOPATH: /home/runner/work/mux-go/mux-go/go
20-
CHECKOUT_LOCATION: /home/runner/work/mux-go/mux-go/go/src/github.com/muxinc/mux-go
2113
steps:
2214
- name: Check out code
23-
uses: actions/checkout@v2
24-
with:
25-
path: ${{env.CHECKOUT_LOCATION}}
15+
uses: actions/checkout@v4
2616
- name: Install Go
27-
uses: actions/setup-go@v2
28-
- name: Install Go Dependencies
29-
run: |
30-
cd $CHECKOUT_LOCATION
31-
export PATH=$PATH:$(go env GOPATH)/bin
32-
go install
17+
uses: actions/setup-go@v5
3318
- name: Run Integration Tests
3419
run: |
35-
cd $CHECKOUT_LOCATION
3620
bash test.sh
3721
env:
3822
MUX_TOKEN_ID: ${{ secrets.MUX_TOKEN_ID }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Not familiar with Mux? Check out https://mux.com/ for more information.
1616
## Installation
1717

1818
```
19-
go get github.com/muxinc/mux-go/v6
19+
go get github.com/muxinc/mux-go/v7
2020
```
2121

2222
## Getting Started
@@ -48,7 +48,7 @@ import (
4848
"fmt"
4949
"os"
5050

51-
"github.com/muxinc/mux-go/v6"
51+
"github.com/muxinc/mux-go/v7"
5252
)
5353

5454
func main() {

configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type ConfigurationOption func(*Configuration)
2222
func NewConfiguration(opts ...ConfigurationOption) *Configuration {
2323
cfg := &Configuration{
2424
basePath: "https://api.mux.com",
25-
userAgent: "Mux Go | 6.0.0",
25+
userAgent: "Mux Go | 7.0.0",
2626
}
2727
for _, opt := range opts {
2828
opt(cfg)

docs/CreateAssetRequest.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Input** | [**[]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-
**PlaybackPolicy** | [**[]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). * `\"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-
**AdvancedPlaybackPolicies** | [**[]CreatePlaybackIdRequest**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional]
6+
**Input** | [**[]InputSettings**](InputSettings.md) | Deprecated. Use `inputs` instead, which accepts an identical type. | [optional]
7+
**Inputs** | [**[]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]
8+
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | Deprecated. Use `playback_policies` instead, which accepts an identical type. | [optional]
9+
**PlaybackPolicies** | [**[]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). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policies` are 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]
10+
**AdvancedPlaybackPolicies** | [**[]CreatePlaybackIdRequest**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID. | [optional]
911
**PerTitleEncode** | **bool** | | [optional]
1012
**Passthrough** | **string** | You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id`, you can use the `meta` object instead. **Max: 255 characters**. | [optional]
1113
**Mp4Support** | **string** | Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions) for the updated API. Specify what level of support for mp4 playback. You may not enable both `mp4_support` and `static_renditions`. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). 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 videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional]

docs/CreateLiveStreamRequest.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
7-
**AdvancedPlaybackPolicies** | [**[]CreatePlaybackIdRequest**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional]
6+
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | Deprecated. Use `playback_policies` instead, which accepts an identical type. | [optional]
7+
**PlaybackPolicies** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this live stream and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the live stream). * `\"signed\"` (an additional access token is required to play the live stream). If no `playback_policies` is set, the live stream 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+
**AdvancedPlaybackPolicies** | [**[]CreatePlaybackIdRequest**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied on this live stream and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID. | [optional]
89
**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
910
**ReconnectWindow** | **float32** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option. | [optional] [default to 60]
1011
**UseSlateForStandardLatency** | **bool** | By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream. | [optional] [default to false]

docs/Upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**Id** | **string** | Unique identifier for the Direct Upload. | [optional]
77
**Timeout** | **int32** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600]
88
**Status** | **string** | | [optional]
9-
**NewAssetSettings** | [**Asset**](Asset.md) | | [optional]
9+
**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
1010
**AssetId** | **string** | Only set once the upload is in the `asset_created` state. | [optional]
1111
**Error** | [**UploadError**](Upload_error.md) | | [optional]
1212
**CorsOrigin** | **string** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional]

examples/data/dimensions/exercise-dimensions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"os"
66

7-
muxgo "github.com/muxinc/mux-go"
8-
"github.com/muxinc/mux-go/examples/common"
7+
muxgo "github.com/muxinc/mux-go/v7"
8+
"github.com/muxinc/mux-go/v7/examples/common"
99
)
1010

1111
func main() {

examples/data/errors/exercise-errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"os"
66

7-
muxgo "github.com/muxinc/mux-go"
8-
"github.com/muxinc/mux-go/examples/common"
7+
muxgo "github.com/muxinc/mux-go/v7"
8+
"github.com/muxinc/mux-go/v7/examples/common"
99
)
1010

1111
// Exercises all error operations:

examples/data/exports/exercise-exports.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"os"
66

7-
"github.com/muxinc/mux-go"
8-
"github.com/muxinc/mux-go/examples/common"
7+
muxgo "github.com/muxinc/mux-go/v7"
8+
"github.com/muxinc/mux-go/v7/examples/common"
99
)
1010

1111
// Exercises all export operations:

examples/data/filters/exercise-filters.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"os"
66

7-
muxgo "github.com/muxinc/mux-go"
8-
"github.com/muxinc/mux-go/examples/common"
7+
muxgo "github.com/muxinc/mux-go/v7"
8+
"github.com/muxinc/mux-go/v7/examples/common"
99
)
1010

1111
// Exercises all filter operations:

0 commit comments

Comments
 (0)