Struct MediaInfo (0.5.0)

Media-specific user event information.

Fields

media_progress_duration

The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] should be set to 90.

media_progress_percentage

Media progress should be computed using only the media_progress_duration relative to the media total length.

This value must be between [0, 1.0] inclusive.

If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset.

Implementations

new

 fn new() -> Self

set_media_progress_duration

 fn set_media_progress_duration<T>(self, v: T) -> Self
where
    T: std::convert::Into<wkt::Duration>,

Sets the value of [media_progress_duration][crate::model::MediaInfo::media_progress_duration].

set_or_clear_media_progress_duration

 fn set_or_clear_media_progress_duration<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<wkt::Duration>,

Sets or clears the value of [media_progress_duration][crate::model::MediaInfo::media_progress_duration].

set_media_progress_percentage

 fn set_media_progress_percentage<T>(self, v: T) -> Self
where
    T: std::convert::Into<f32>,

Sets the value of [media_progress_percentage][crate::model::MediaInfo::media_progress_percentage].

set_or_clear_media_progress_percentage

 fn set_or_clear_media_progress_percentage<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<f32>,

Sets or clears the value of [media_progress_percentage][crate::model::MediaInfo::media_progress_percentage].