blob: 2f1ec13f03f4a6573495394b292b6abf7b7c4f66 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module media.mojom;
import "url/mojom/origin.mojom";
struct MediaEngagementScoreDetails {
url.mojom.Origin origin;
double total_score;
// Details of the components which make up |score|.
int32 visits;
int32 media_playbacks;
// Last media playback time in milliseconds since the epoch format.
double last_media_playback_time;
// Whether the score is considered to be high.
bool is_high;
// Data used for experiments.
int32 audible_playbacks;
int32 significant_playbacks;
// How many time the score changed `is_high` status.
int32 high_score_changes;
// Details of the components which make up |media_playbacks|.
int32 audio_context_playbacks;
int32 media_element_playbacks;
};
struct MediaEngagementConfig {
// Origins with a number of visits less than this number will receive
// a score of zero.
int32 score_min_visits;
// The upper and lower threshold of whether the total score is considered
// to be high.
double high_score_lower_threshold;
double high_score_upper_threshold;
// The state of different internal autoplay features and flags.
bool feature_record_data;
bool feature_bypass_autoplay;
bool feature_preload_data;
bool feature_autoplay_disable_settings;
bool feature_autoplay_whitelist_settings;
bool pref_disable_unified_autoplay;
bool has_custom_autoplay_policy;
string autoplay_policy;
// The current version of any preloaded component.
string preload_version;
};
interface MediaEngagementScoreDetailsProvider {
GetMediaEngagementScoreDetails() => (array<MediaEngagementScoreDetails> info);
GetMediaEngagementConfig() => (MediaEngagementConfig config);
};