File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ void MediaKeySession::OnClosed() {
518
518
mIsClosed = true ;
519
519
mKeys ->OnSessionClosed (this );
520
520
mKeys = nullptr ;
521
- mClosed ->MaybeResolveWithUndefined ( );
521
+ mClosed ->MaybeResolve (MediaKeySessionClosedReason::Closed_by_application );
522
522
}
523
523
524
524
bool MediaKeySession::IsClosed () const { return mIsClosed ; }
Original file line number Diff line number Diff line change 10
10
* W3C liability, trademark and document use rules apply.
11
11
*/
12
12
13
+ enum MediaKeySessionClosedReason {
14
+ "internal-error" ,
15
+ "closed-by-application" ,
16
+ "release-acknowledged" ,
17
+ "hardware-context-reset" ,
18
+ "resource-evicted"
19
+ };
20
+
13
21
[Exposed=Window ]
14
22
interface MediaKeySession : EventTarget {
15
23
// error state
@@ -20,7 +28,7 @@ interface MediaKeySession : EventTarget {
20
28
21
29
readonly attribute unrestricted double expiration;
22
30
23
- readonly attribute Promise< undefined > closed;
31
+ readonly attribute Promise< MediaKeySessionClosedReason > closed;
24
32
25
33
readonly attribute MediaKeyStatusMap keyStatuses;
26
34
You can’t perform that action at this time.
0 commit comments