picture_in_picture.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. /**
  5. * @fileoverview Picture-in-picture APIs.
  6. * @see https://wicg.github.io/picture-in-picture/
  7. * @externs
  8. */
  9. /**
  10. * @interface
  11. * @extends {EventTarget}
  12. * @see https://wicg.github.io/picture-in-picture/#interface-picture-in-picture-window
  13. */
  14. function PictureInPictureWindow() {}
  15. /** @type {number} */
  16. PictureInPictureWindow.prototype.width;
  17. /** @type {number} */
  18. PictureInPictureWindow.prototype.length;
  19. /** @type {?function(!Event)} */
  20. PictureInPictureWindow.prototype.onresize;
  21. /**
  22. * @see https://wicg.github.io/picture-in-picture/#htmlvideoelement-extensions
  23. * @return {!Promise<!PictureInPictureWindow>}
  24. */
  25. HTMLVideoElement.prototype.requestPictureInPicture = function() {};
  26. /**
  27. * @type {?function(!Event)}
  28. * @see https://wicg.github.io/picture-in-picture/#htmlvideoelement-extensions
  29. */
  30. HTMLVideoElement.prototype.onenterpictureinpicture;
  31. /**
  32. * @type {?function(!Event)}
  33. * @see https://wicg.github.io/picture-in-picture/#htmlvideoelement-extensions
  34. */
  35. HTMLVideoElement.prototype.onleavepictureinpicture;
  36. /**
  37. * @type {boolean}
  38. * @see https://wicg.github.io/picture-in-picture/#htmlvideoelement-extensions
  39. */
  40. HTMLVideoElement.prototype.autoPictureInPicture;
  41. /**
  42. * @type {boolean}
  43. * @see https://wicg.github.io/picture-in-picture/#htmlvideoelement-extensions
  44. */
  45. HTMLVideoElement.prototype.disablePictureInPicture;
  46. /**
  47. * @type {boolean}
  48. * @see https://wicg.github.io/picture-in-picture/#document-extensions
  49. */
  50. Document.prototype.pictureInPictureEnabled;
  51. /**
  52. * @see https://wicg.github.io/picture-in-picture/#document-extensions
  53. * @return {!Promise<void>}
  54. */
  55. Document.prototype.exitPictureInPicture = function() {};
  56. /**
  57. * @type {?HTMLVideoElement}
  58. * @see https://wicg.github.io/picture-in-picture/#documentorshadowroot-extension
  59. */
  60. Document.prototype.pictureInPictureElement;