def media_player(self, name, url, **kwargs):
        """Defines a media player object.

        Args:
            name: the name of the property
            url: the URL of the media to display
            on_start (None): the operator to execute when the media starts
            on_play (None): the operator to execute when the media is played
            on_pause (None): the operator to execute when the media is paused
            on_buffer (None): the operator to execute when the media is buffering
            on_buffer_end (None): the operator to execute when the media stops buffering
            on_ended (None): the operator to execute when the media ends
            on_error (None): the operator to execute when the media errors
            on_duration (None): the operator to execute when the media duration is loaded
            on_seek (None): the operator to execute when the media is seeked
            on_progress (None): the operator to execute when the media progresses

        Returns:
            a :class:`Object`
        """
        media_player = MediaPlayerView(**kwargs)
        obj = Object()
        self.define_property(
            name, obj, view=media_player, default={"url": url}
        )
        return obj
Defines a media player object.

        Args:
            name: the name of the property
            url: the URL of the media to display
            on_start (None): the operator to execute when the media starts
            on_play (None): the operator to execute when the media is played
            on_pause (None): the operator to execute when the media is paused
            on_buffer (None): the operator to execute when the media is buffering
            on_buffer_end (None): the operator to execute when the media stops buffering
            on_ended (None): the operator to execute when the media ends
            on_error (None): the operator to execute when the media errors
            on_duration (None): the operator to execute when the media duration is loaded
            on_seek (None): the operator to execute when the media is seeked
            on_progress (None): the operator to execute when the media progresses

        Returns:
            a :class:`Object`
        
fiftyone/operators/types.py