BCOVGoogleCastManagerDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | BCOVGoogleCastManager.h |
playbackController
required method
@property (nonatomic, strong, readonly) id<BCOVPlaybackController> _Nullable playbackController– switchedToLocalPlayback:withError:
This method is called when a cast session ends
- (void)switchedToLocalPlayback:(NSTimeInterval)lastKnownStreamPosition withError:(nullable NSError *)errorParameters
lastKnownStreamPosition |
An NSTimeInterval value of the last known stream position |
|---|---|
error |
If we received an error from the Google Cast SDK, it will be passed through here |
Discussion
You can use this to show/hide UI elements, or trigger other events, once a cast session ends
Declared In
BCOVGoogleCastManager.h
– switchedToRemotePlayback
This method is called when a cast session starts
- (void)switchedToRemotePlaybackDiscussion
You can use this to show/hide UI elements, or trigger other events, once a cast session begins.
Declared In
BCOVGoogleCastManager.h
– currentCastedVideoDidComplete
This method is called when a casted video has finished playing.
- (void)currentCastedVideoDidCompleteDiscussion
You can use this to show/hide UI elements, or trigger other events, once a casted video has completed playback
Declared In
BCOVGoogleCastManager.h
– castedVideoFailedToPlay
This method is called when a casted video fails to play.
- (void)castedVideoFailedToPlayDiscussion
You can use this to show/hide UI elements, or trigger other events, once a casted video fails to play
Declared In
BCOVGoogleCastManager.h
– suitableSourceNotFound
This method is called when a suitable source is not found.
- (void)suitableSourceNotFoundDiscussion
The BCOVGoogleCastManager will look for HTTPS version of HLS v3, then check for DASH, and finally an MP4 source. If no HTTPS versions are found it will then check for HTTP versions of the same source types. If no HTTP versions are found this method will be called.
Declared In
BCOVGoogleCastManager.h
– willBuildMediaInformationBuilder:
This method is called prior to calling build on the current
instance of GCKMediaInformationBuilder set up for the current video about
to be cast. This will allow you to add any additional values to the builder
as needed. You can use this method to pass custom data to the builder in
your receiver app.
- (void)willBuildMediaInformationBuilder:(GCKMediaInformationBuilder *_Nonnull)builderDiscussion
This method is called prior to calling build on the current
instance of GCKMediaInformationBuilder set up for the current video about
to be cast. This will allow you to add any additional values to the builder
as needed. You can use this method to pass custom data to the builder in
your receiver app.
Declared In
BCOVGoogleCastManager.h
– willSendMediaLoadOptions:
This method is called prior invoking loadMedia:withOptions on
the current cast session’s remoteMediaClient.
- (void)willSendMediaLoadOptions:(GCKMediaLoadOptions *_Nonnull)mediaLoadOptionsDiscussion
You can use this delegate method to further configure GCKMediaLoadOptions as needed prior to it being sent fo the remoteMediaClient.
Declared In
BCOVGoogleCastManager.h
– useSourceFromSources:
This method is called when a source needs to be parsed prior to casting.
- (BCOVSource *_Nonnull)useSourceFromSources:(NSArray<BCOVSource*> *_Nonnull)sourcesDiscussion
You can use this method to specify the source you want to be used
with the Cast Receiver.
If you do not implement this method, BCOVGoogleCastManager
will perform source selecton on its own (see suitiableSourceNotFound for more information).
Declared In
BCOVGoogleCastManager.h
– shouldCastVideo:
This method is called after BCOVGoogleCastManager has received a new playback session.
- (BOOL)shouldCastVideo:(BCOVVideo *_Nonnull)videoDiscussion
When BCOVGoogleCastManager receives a new BCOVVideo from a playback session it will attempt to compare it to the previous BCOVVideo, if there is one, to prevent the cast session from restarting with the same video. You can use this method to override the internal check so that you have control over if the current video should be cast or not.
Declared In
BCOVGoogleCastManager.h