Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerList = []string{
"https://api.mux.com",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type Mux ¶
type Mux struct {
// Assets - An asset refers to a piece of media content that is stored or is being live streamed through the Mux system. An asset always has a duration and one or more tracks (audio, video, and text data).
//
// The media content of an asset cannot be updated once created, however an asset can be used to create another asset, and can be modified within that process.
Assets *assets
// DeliveryUsage - The Delivery Usage API allows you to get delivery/streaming usage details for each asset and across all assets. Delivery usage details are aggregated every hour at the top of the hour and can be requested for a specified time window within the last 90 days starting at 12 hours prior to when the request is made.
//
// Assets are ordered by delivery usage starting with the one with the highest usage. Only assets with delivery usage greater than 0 seconds are returned in the response.
DeliveryUsage *deliveryUsage
// Dimensions - Dimensions are the types of metadata that can be collected for a video view. Some dimensions are collected automatically based on the playback or device, such as the viewer's Country or the device information. Other dimensions are specified by the developer when configuring a Mux Data video view such as the video title. The Dimensions APIs allow you to get a list of the supported dimensions and their values.
Dimensions *dimensions
// DirectUploads - Direct upload allows you to push assets directly to Mux storage instead of needing to go through your own first. When you create a new direct upload, we'll give you back a signed URL for a Google Cloud Storage bucket. Their storage API is S3 compatible, so whatever tool you use to upload to either GCS or S3 should work, just remember you're probably uploading large video files and should [take advantage of things like resumable or multipart uploads](https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload).
//
// Particularly for customers that deal with a lot of user-generated content, it's common to expect quite a few abandoned uploads. To keep those abandoned uploads from cluttering up your asset lists, we don't create an asset for you until the upload is complete. Once that asset is created, you can expect all of the normal asset-related webhooks.
DirectUploads *directUploads
// Errors - Playback errors are tracked and aggregated by Mux Data. Errors can be listed by the API, which contains data about the error code, message, and how often the error occurred.
Errors *errors
// Exports - Exports allow you to download the daily CSV files that are generated from the video views that occurred in the previous day. Please contact [support](mailto:support@mux.com) for information about enabling exports for your organization.
Exports *exports
// Filters - Deprecated, please refer to the Dimensions APIs.
Filters *filters
// Incidents - Incidents occur when an anomaly alert is triggered in Mux Data. The Incidents API provides operations related to the raising and managing of alerting incidents.
Incidents *incidents
// LiveStreams - A Live Stream represents a unique live stream of video being pushed to Mux. It includes configuration details (a Stream Key) for live broadcasting software/hardware and a Playback ID for playing the stream anywhere. Currently, RTMP is the only supported method of ingesting video. Use rtmp://global-live.mux.com:5222/app with the Live Stream's Stream Key for getting the video into Mux, and use https://stream.mux.com with the Live Stream's Playback ID for playback.
//
// A Live Stream can be used once for a specific event, or re-used forever. If you're building an application like Facebook Live or Twitch, you could create one Live Stream per user. This allows them to configure their broadcasting software once, and the Live Stream Playback ID will always show their latest stream.
//
// Each RTMP session creates a new video asset automatically. You can set up a webhook to be notified each time a broadcast (or Live Stream RTMP session) begins or ends with the video.live_stream.active and video.live_stream.idle events respectively. Assets that are created from a Live Stream have the same behavior as other Assets you create.
//
// Learn more about [how to go live in our guides](https://docs.mux.com/docs/live-streaming).
LiveStreams *liveStreams
// Metrics - Historical metrics are used for tracking KPIs, diagnosing issues, and
// measuring viewers' quality of experience. Metrics are calculated using the
// video views that have been completed and are bucketed on the view end time
// for quality of experience metrics and view start time for engagement
// metrics. Historical metrics provide a large collection of dimensions that
// can be used to aggregate quality of experience based on view metadata. You
// can also easily compare experiences across viewer populations to, for
// example, find issues with specific devices or geographies.
//
// Historical metrics are similar but not directly comparable to the real-time
// metrics in the Real-time APIs. These metrics are aggregated for long-term
// storage historical reporting and are generated using different viewer
// populations.
//
Metrics *metrics
// Monitoring - Monitoring metrics are used for operational monitoring of a video platform.
// The metrics are aggregated in five second intervals, across the views that
// are currently being watched. The real-time metrics' timeline, breakdown,
// and histogram representations are available via the APIs.
//
// Monitoring metrics are similar but not directly comparable to the historical
// metrics in the Metrics APIs. These metrics are aggregated to provide the most
// operational detail possible used for resolving operational issues.
//
Monitoring *monitoring
// PlaybackID - Operations related to the manipulation of playback IDs, through which users are able to stream videos and live streams from Mux.
PlaybackID *playbackID
// PlaybackRestrictions - Playback Restrictions allows you to set additional rules for playing videos. You can set the domains/hostnames allowed to play your videos. For instance, viewers can play videos embedded on the `https://example.com` website when you set the Playback Restrictions with `example.com` as an allowed domain. Any Video requests from other websites are denied.
PlaybackRestrictions *playbackRestrictions
// RealTime - The Mux Data Real-time API has been deprecated, please refer to the
// Mux Data `Monitoring` APIs which provide the same functionality.
//
RealTime *realTime
// Spaces - Spaces allow developers to build real-time video and audio experiences into their applications via the [Real-Time Video product.](https://mux.com/real-time-video)
//
// Composited video of space sessions can be sent to live streams using broadcasts.
//
// To add real-time video to an application, you'll also need to integrate one of our [Real-Time Video SDKs](/guides/video/build-real-time-video-experiences#5-integrate-a-real-time-video-sdk).
//
// Learn more in the [Real-Time Video guides](/guides/video/build-real-time-video-experiences).
Spaces *spaces
// TranscriptionVocabularies - Transcription Vocabularies allows you to provide collections of phrases like proper nouns, technical jargon, and uncommon words as part of captioning workflows. When using Auto-Generated Captions, Transcription Vocabularies increase the likelihood of correct speech recognition for these words and phrases.
TranscriptionVocabularies *transcriptionVocabularies
// URLSigningKeys - A URL signing key is used as the secret when signing any Mux URL. Mux requires a [JSON Web Token](https://jwt.io/) as the value of the token query parameter. The token query parameter must be set for URLs that reference a playback ID with a signed playback policy.
URLSigningKeys *urlSigningKeys
// VideoViews - An individual video view tracked by Mux Data. For the full list of properties for each view please refer to the table of data fields in the [Export raw video view data guide](https://docs.mux.com/guides/data/export-raw-video-view-data).
VideoViews *videoViews
// contains filtered or unexported fields
}
Mux - Mux API: Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
type SDKOption ¶
type SDKOption func(*Mux)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithSecurity ¶
WithSecurity configures the SDK to use the provided security details
func WithServerIndex ¶ added in v1.19.0
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
Source Files
¶
Click to show internal directories.
Click to hide internal directories.