Commit bcc1d816 authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Notify media-internals users of new experiment

A floating message box that looks like this:
https://files.tedm.io/popup.png

Bug: 794255
Change-Id: Icf73a6c1d92f96b61f27329bf02e4391a03209c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873345
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708397}
parent caab18fc
...@@ -21,6 +21,7 @@ var Manager = (function() { ...@@ -21,6 +21,7 @@ var Manager = (function() {
var copyAllPlayerButton = $('copy-all-player-button'); var copyAllPlayerButton = $('copy-all-player-button');
var copyAllAudioButton = $('copy-all-audio-button'); var copyAllAudioButton = $('copy-all-audio-button');
var hidePlayersButton = $('hide-players-button'); var hidePlayersButton = $('hide-players-button');
var devtoolsNoticeWindow = $('devtools-notice-window');
// In tests we may not have these buttons. // In tests we may not have these buttons.
if (copyAllPlayerButton) { if (copyAllPlayerButton) {
...@@ -39,6 +40,9 @@ var Manager = (function() { ...@@ -39,6 +40,9 @@ var Manager = (function() {
if (hidePlayersButton) { if (hidePlayersButton) {
hidePlayersButton.onclick = this.hidePlayers_.bind(this); hidePlayersButton.onclick = this.hidePlayers_.bind(this);
} }
if (devtoolsNoticeWindow) {
devtoolsNoticeWindow.onclick = this.hideNoticeWindow_;
}
} }
Manager.prototype = { Manager.prototype = {
...@@ -125,6 +129,10 @@ var Manager = (function() { ...@@ -125,6 +129,10 @@ var Manager = (function() {
}, this); }, this);
}, },
hideNoticeWindow_: function() {
this.style.display = 'none';
},
updatePlayerInfoNoRecord: function(id, timestamp, key, value) { updatePlayerInfoNoRecord: function(id, timestamp, key, value) {
if (!this.players_[id]) { if (!this.players_[id]) {
console.error('[updatePlayerInfo] Id ' + id + ' does not exist'); console.error('[updatePlayerInfo] Id ' + id + ' does not exist');
......
...@@ -237,3 +237,18 @@ label.destructed-player { ...@@ -237,3 +237,18 @@ label.destructed-player {
#audio-focus-session-list { #audio-focus-session-list {
list-style: none; list-style: none;
} }
#devtools-notice-window {
background-color: rgb(252, 247, 134);
border: 1px solid black;
border-radius: 4px;
font-size: 10px;
height: 40px;
left: 50%;
line-height: 20px;
margin-inline-start: -300px;
position: fixed;
text-align: center;
top: 10px;
width: 450px;
}
\ No newline at end of file
...@@ -20,6 +20,17 @@ found in the LICENSE file. ...@@ -20,6 +20,17 @@ found in the LICENSE file.
</head> </head>
<body> <body>
<div id="devtools-notice-window">
<div>
Media Internals functionality is now available in the media tab of the
developer tools.
</div>
<div>
<a href="chrome://flags/#enable-media-internals-devtools">
To try it, enable the flag here.
</a>
</div>
</div>
<tabbox> <tabbox>
<tabs> <tabs>
<tab>Players</tab> <tab>Players</tab>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment