Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. /**
  2. * The HTMLMediaElement interface adds to HTMLElement the properties and methods needed to support
  3. * basic media-related capabilities that are common to audio and video.
  4. * The HTMLVideoElement and HTMLAudioElement elements both inherit this interface.
  5. */
  6. interface HTMLMediaElement extends HTMLElement {
  7. /**
  8. * Loads the data of audio Object
  9. */
  10. load():undefined;
  11.  
  12. /**
  13. * Begins playback of the media.
  14. */
  15. play():undefined;
  16.  
  17. /**
  18. * Pauses the media playback.
  19. */
  20. pause:undefined;
  21.  
  22. /**
  23. * The new TextTrack object is added to the list of text tracks for the audio/video element.
  24. * @param {string} kind
  25. * @param {string} label
  26. * @param {string} language
  27. */
  28. addTextTrack(kind:string, label?:string, language?:string): TextTrack;
  29.  
  30. /**
  31. * Returns a string that specifies whether the client can play a given media resource type.
  32. * @param type
  33. */
  34. canPlayType(type:string): string;
  35.  
  36. /**
  37. * Sets the MediaKeys keys to use when decrypting media during playback.
  38. * @param mediaKeys
  39. */
  40. setMediaKeys(mediaKeys:MediaKeys): Promise;
  41.  
  42. /**
  43. * Directly seeks to the given time.
  44. */
  45. fastSeek():void;
  46.  
  47. /**
  48. * TODO: No description provided
  49. *
  50. * @deprecated
  51. */
  52. webkitGenerateKeyRequest():Function;
  53.  
  54. /**
  55. * TODO: No description provided
  56. *
  57. * @deprecated
  58. */
  59. webkitAddKey():Function;
  60.  
  61. /**
  62. * TODO: No description provided
  63. *
  64. * @deprecated
  65. */
  66. webkitCancelKeyRequest():Function;
  67.  
  68. /**
  69. * TODO: No description provided
  70. *
  71. * @deprecated
  72. */
  73. mozCaptureStream():undefined;
  74.  
  75. /**
  76. * TODO: No description provided
  77. *
  78. * @deprecated
  79. */
  80. mozCaptureStreamUntilEnded():undefined;
  81.  
  82. /**
  83. * Returns Object, which contains properties that represent metadata from the playing media resource
  84. * as {key: value} pairs. A separate copy of the data is returned
  85. * each time the method is called. This method must be called after the loadedmetadata event fires.
  86. *
  87. * @deprecated
  88. */
  89. mozGetMetadata():Object;
  90.  
  91. /**
  92. * This method, available only in Mozilla's implementation, loads data from another media element.
  93. * This works similarly to load() except that instead of running the normal resource selection algorithm,
  94. * the source is simply set to the other element's currentSrc. This is optimized so this element gets
  95. * access to all of the other element's cached and buffered data; in fact, the two elements share
  96. * downloaded data, so data downloaded by either element is available to both.
  97. *
  98. * @deprecated
  99. */
  100. mozLoadFrom():Function;
  101. }
  102.  
  103. declare var HTMLMediaElement:{
  104. /**
  105. * Returns a MediaError object for the most recent error, or null if there has not been an error.
  106. */
  107. error?:MediaError;
  108.  
  109. /**
  110. * A DOMString that reflects the src HTML attribute, which contains the URL of a media resource to use.
  111. */
  112. src:string;
  113.  
  114. /**
  115. * Returns a DOMString with the absolute URL of the chosen media resource.
  116. * @readonly
  117. */
  118. currentSrc:string;
  119.  
  120. /**
  121. * A DOMString indicating the CORS setting for this media element.
  122. */
  123. crossOrigin?:string;
  124.  
  125. /**
  126. * Returns an unsigned short (enumeration) indicating the current state of fetching the media over the network.
  127. * @readonly
  128. */
  129. networkState:number; // 0|1|2|3
  130. NETWORK_EMPTY:number; // 0
  131. NETWORK_IDLE:number; // 1
  132. NETWORK_LOADING:number; // 2
  133. NETWORK_NO_SOURCE:number; // 3
  134.  
  135. БЛЯТЬ КАК!!!!????
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement