blob: 25a7e9bd07683e082ba79e62e8ee13e4a160e8ec [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/mojo/url.mojom";
struct MediaEngagementScoreDetails {
url.mojom.Url 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;
};
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;
};
interface MediaEngagementScoreDetailsProvider {
GetMediaEngagementScoreDetails() => (array<MediaEngagementScoreDetails> info);
GetMediaEngagementConfig() => (MediaEngagementConfig config);
};