iOS SDK Version

FBMediaViewDelegate

Objective-C
@protocolFBMediaViewDelegate<NSObject>
Swift
protocolFBMediaViewDelegate:NSObjectProtocol
The methods declared by the FBMediaViewDelegate protocol allow the adopting delegate to respond to messages from the FBMediaView class and thus respond to operations such as whether the media content has been loaded.
  • Sent when an FBMediaView has been successfully loaded.

    Declaration

    Objective-C
    -(void)mediaViewDidLoad:(nonnullFBMediaView*)mediaView;
    Swift
    optionalfuncmediaViewDidLoad(_mediaView:FBMediaView)

    Parameters

  • Sent just before an FBMediaView will enter the fullscreen layout.

    Declaration

    Objective-C
    -(void)mediaViewWillEnterFullscreen:(nonnullFBMediaView*)mediaView;
    Swift
    optionalfuncmediaViewWillEnterFullscreen(_mediaView:FBMediaView)

    Parameters

  • Sent after an FBMediaView has exited the fullscreen layout.

    Declaration

    Objective-C
    -(void)mediaViewDidExitFullscreen:(nonnullFBMediaView*)mediaView;
    Swift
    optionalfuncmediaViewDidExitFullscreen(_mediaView:FBMediaView)

    Parameters

  • Sent when an FBMediaView has changed the playback volume of a video ad.

    Declaration

    Objective-C
    -(void)mediaView:(nonnullFBMediaView*)mediaViewvideoVolumeDidChange:(float)volume;
    Swift
    optionalfuncmediaView(_mediaView:FBMediaView,videoVolumeDidChangevolume:Float)

    Parameters

  • Sent after a video ad in an FBMediaView enters a paused state.

    Declaration

    Objective-C
    -(void)mediaViewVideoDidPause:(nonnullFBMediaView*)mediaView;
    Swift
    optionalfuncmediaViewVideoDidPause(_mediaView:FBMediaView)

    Parameters

  • Sent after a video ad in an FBMediaView enters a playing state.

    Declaration

    Objective-C
    -(void)mediaViewVideoDidPlay:(nonnullFBMediaView*)mediaView;
    Swift
    optionalfuncmediaViewVideoDidPlay(_mediaView:FBMediaView)

    Parameters

  • Sent when a video ad in an FBMediaView reaches the end of playback.

    Declaration

    Objective-C
    -(void)mediaViewVideoDidComplete:(nonnullFBMediaView*)mediaView;
    Swift
    optionalfuncmediaViewVideoDidComplete(_mediaView:FBMediaView)

    Parameters