This protocol defines all the required methods to manage audio tracks for an asset.
More...
#import <OOAudioTrackSelectionProtocol.h>
This protocol defines all the required methods to manage audio tracks for an asset.
- (NSArray * OOAudioTrackSelectionProtocol) availableAudioTracks |
|
|
|
Searchs for all of the audio tracks for the current asset.
It requires that a video has already loaded.
The following code snippet shows an example of this method. It assumes you are listening to the events of the OOOoyalaPlayer using notifications:
if ([notification.name isEqualToString:OOOoyalaPlayerStateChangedNotification]) {
NSNumber *state = notification.userInfo[@"newState"];
if (state.intValue == OOOoyalaPlayerStateReady) {
}
}
- Returns
- NSArray of OOAudioTrackProtocol objects. It could be empty if no audio tracks were found.
- (id<OOAudioTrackProtocol> OOAudioTrackSelectionProtocol) defaultAudioTrack |
|
|
|
Gets the default audio track from manifest.
- Returns
- An OOAudioTrackProtocol object or nil if nothing was found
- (id <OOAudioTrackProtocol> OOAudioTrackSelectionProtocol) selectedAudioTrack |
|
|
|
Gets the currently selected (loaded) audio track.
It requires that a video has already loaded.
The following code snippet shows an example of this method. It assumes you are listening to the events of the OOOoyalaPlayer using notifications:
if ([notification.name isEqualToString:OOOoyalaPlayerStateChangedNotification]) {
NSNumber *state = notification.userInfo[@"newState"];
if (state.intValue == OOOoyalaPlayerStateReady) {
}
}
- Returns
- an OOAudioTrackProtocol object or nil if nothing was found.
- (void OOAudioTrackSelectionProtocol) setAudioTrack: |
|
(id< OOAudioTrackProtocol >) |
audioTrack |
|
Requests the player to change the current audio track to the one provided as a parameter.
It requires that a video has already loaded.
The following code snippet shows an example of this method. It assumes you are listening to the events of the OOOoyalaPlayer using notifications:
if ([notification.name isEqualToString:OOOoyalaPlayerStateChangedNotification]) {
NSNumber *state = notification.userInfo[@"newState"];
if (state.intValue == OOOoyalaPlayerStateReady) {
[self.player setAudioTrack:audioTracks[1]];
}
}
- Parameters
-
The documentation for this protocol was generated from the following file: