BackgroundAudioTrack
BackgroundAudioTrack
BackgroundAudioTrack
BackgroundAudioTrack
Class
Definition
Represents a single audio track for accompanying a video clip.
public : sealed class BackgroundAudioTrack : IBackgroundAudioTrackpublic sealed class BackgroundAudioTrack : IBackgroundAudioTrackPublic NotInheritable Class BackgroundAudioTrack Implements IBackgroundAudioTrack// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
Add background audio tracks to a composition by adding them to a MediaComposition object's BackgroundAudioTracks collection.
For how-to guidance on adding media editing to your app, see Media compositions and editing.
Properties
AudioEffectDefinitions AudioEffectDefinitions AudioEffectDefinitions AudioEffectDefinitions
Gets the list of audio effect definitions for processing the background audio track.
public : IVector<IAudioEffectDefinition> AudioEffectDefinitions { get; }public IList<IAudioEffectDefinition> AudioEffectDefinitions { get; }Public ReadOnly Property AudioEffectDefinitions As IList<IAudioEffectDefinition>// You can use this property in JavaScript.
- Value
- IVector<IAudioEffectDefinition> IList<IAudioEffectDefinition> IList<IAudioEffectDefinition> IList<IAudioEffectDefinition>
The list of audio effect definitions for processing the background audio track.
Delay Delay Delay Delay
Specifies how long to wait before starting background audio playback.
public : TimeSpan Delay { get; set; }public TimeSpan Delay { get; set; }Public ReadWrite Property Delay As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The length of time between the start of video playback and the start of background audio playback. This value can be negative to start background audio before video playback.
OriginalDuration OriginalDuration OriginalDuration OriginalDuration
Original playback time of the background audio track, without the effects of the TrimTimeFromStart and TrimTimeFromEnd properties.
public : TimeSpan OriginalDuration { get; }public TimeSpan OriginalDuration { get; }Public ReadOnly Property OriginalDuration As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The original duration of the background audio track is equal to TrimmedDuration + TrimTimeFromStart + TrimTimeFromEnd.
TrimmedDuration TrimmedDuration TrimmedDuration TrimmedDuration
Duration of the background audio track with TrimTimeFromStart and TrimTimeFromEnd applied to playback.
public : TimeSpan TrimmedDuration { get; }public TimeSpan TrimmedDuration { get; }Public ReadOnly Property TrimmedDuration As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The trimmed duration of the background audio track is equal to OriginalDuration - (TrimTimeFromStart + TrimTimeFromEnd ).
TrimTimeFromEnd TrimTimeFromEnd TrimTimeFromEnd TrimTimeFromEnd
The amount of time to trim from the end of the background audio track.
public : TimeSpan TrimTimeFromEnd { get; set; }public TimeSpan TrimTimeFromEnd { get; set; }Public ReadWrite Property TrimTimeFromEnd As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The trim time must be greater than or equal to 0 and less than the length of the background audio track.
TrimTimeFromStart TrimTimeFromStart TrimTimeFromStart TrimTimeFromStart
The amount of time to trim from the beginning of the background audio track.
public : TimeSpan TrimTimeFromStart { get; set; }public TimeSpan TrimTimeFromStart { get; set; }Public ReadWrite Property TrimTimeFromStart As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The trim time must be greater than or equal to 0 and less than the length of the background audio track.
UserData UserData UserData UserData
An associative collection for storing custom properties associated with the background audio track.
public : IMap<string, string> UserData { get; }public IDictionary<string, string> UserData { get; }Public ReadOnly Property UserData As IDictionary<string, string>// You can use this property in JavaScript.
- Value
- IMap<PlatForm::String, PlatForm::String> IDictionary<string, string> IDictionary<string, string> IDictionary<string, string>
The values stored in the IMap must be strings. These values are app-defined and are not used by the operating system. You can use this collection to store, for example, a description of the background audio track.
Volume Volume Volume Volume
Gets or sets the volume of the background audio track.
public : double Volume { get; set; }public double Volume { get; set; }Public ReadWrite Property Volume As double// You can use this property in JavaScript.
- Value
- double double double double
A value between 0 and 1 represents a reduction in the volume level of the background audio track where 0 is silence and 1 is normal volume. A value greater than 1 represents a boost in the volume of the background audio track.
Methods
Clone() Clone() Clone() Clone()
Creates a BackgroundAudioTrack object that is identical to this instance.
public : BackgroundAudioTrack Clone()public BackgroundAudioTrack Clone()Public Function Clone() As BackgroundAudioTrack// You can use this method in JavaScript.
A BackgroundAudioTrack object that is a copy of this instance.
CreateFromEmbeddedAudioTrack(EmbeddedAudioTrack) CreateFromEmbeddedAudioTrack(EmbeddedAudioTrack) CreateFromEmbeddedAudioTrack(EmbeddedAudioTrack) CreateFromEmbeddedAudioTrack(EmbeddedAudioTrack)
Creates a background audio track object with audio content copied from an embedded audio track object.
public : static BackgroundAudioTrack CreateFromEmbeddedAudioTrack(EmbeddedAudioTrack embeddedAudioTrack)public static BackgroundAudioTrack CreateFromEmbeddedAudioTrack(EmbeddedAudioTrack embeddedAudioTrack)Public Static Function CreateFromEmbeddedAudioTrack(embeddedAudioTrack As EmbeddedAudioTrack) As BackgroundAudioTrack// You can use this method in JavaScript.
- embeddedAudioTrack
- EmbeddedAudioTrack EmbeddedAudioTrack EmbeddedAudioTrack EmbeddedAudioTrack
An embedded audio track to use as the source audio for the background audio track.
A new background audio track object containing audio content copied from the embedded audio track.
CreateFromFileAsync(IStorageFile) CreateFromFileAsync(IStorageFile) CreateFromFileAsync(IStorageFile) CreateFromFileAsync(IStorageFile)
Creates a background audio track from an audio file.
public : static IAsyncOperation<BackgroundAudioTrack> CreateFromFileAsync(IStorageFile file)public static IAsyncOperation<BackgroundAudioTrack> CreateFromFileAsync(IStorageFile file)Public Static Function CreateFromFileAsync(file As IStorageFile) As IAsyncOperation( Of BackgroundAudioTrack )// You can use this method in JavaScript.
A StorageFile object representing the source audio file.
A new background audio track object containing the contents of the audio file.
GetAudioEncodingProperties() GetAudioEncodingProperties() GetAudioEncodingProperties() GetAudioEncodingProperties()
Gets the AudioEncodingProperties for the background audio track.
public : AudioEncodingProperties GetAudioEncodingProperties()public AudioEncodingProperties GetAudioEncodingProperties()Public Function GetAudioEncodingProperties() As AudioEncodingProperties// You can use this method in JavaScript.
The AudioEncodingProperties for the background audio track.