Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloudflare-video-element

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudflare-video-element - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [1.0.2](https://github.com/luwes/cloudflare-video-element/compare/v1.0.1...v1.0.2) (2023-09-17)
### Bug Fixes
* add readyState workaround fix [#1](https://github.com/luwes/cloudflare-video-element/issues/1) ([09c8592](https://github.com/luwes/cloudflare-video-element/commit/09c8592914ea4b809cd34a609c6d157fa15f2283))
## [1.0.1](https://github.com/luwes/cloudflare-video-element/compare/v1.0.0...v1.0.1) (2023-08-06)

@@ -2,0 +11,0 @@

16

cloudflare-video-element.js

@@ -79,2 +79,3 @@ // https://developers.cloudflare.com/stream/viewing-videos/using-the-stream-player/using-the-player-api/

#options;
#readyState = 0;

@@ -97,2 +98,3 @@ constructor() {

this.#readyState = 0;
this.dispatchEvent(new Event('emptied'));

@@ -150,2 +152,14 @@

this.api.addEventListener('loadedmetadata', () => {
this.#readyState = 1; // HTMLMediaElement.HAVE_METADATA
});
this.api.addEventListener('loadeddata', () => {
this.#readyState = 2; // HTMLMediaElement.HAVE_CURRENT_DATA
});
this.api.addEventListener('playing', () => {
this.#readyState = 3; // HTMLMediaElement.HAVE_FUTURE_DATA
});
// The video events are dispatched on the api instance.

@@ -219,3 +233,3 @@ // This makes it possible to add event listeners before the element is upgraded.

get readyState() {
return this.api?.readyState;
return this.#readyState;
}

@@ -222,0 +236,0 @@

2

package.json
{
"name": "cloudflare-video-element",
"version": "1.0.1",
"version": "1.0.2",
"description": "A custom element for the Cloudflare player with an API that matches the `<video>` API",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc